Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
Tag: linux
How to build the same Linux Kernel twice sources and get the same checksum
I’m searching if it’s possible to build the same Linux Kerneltwice (same sources, same environment, same options, same compiler) and get the same checksum. Anybody knows how to do so? Answer The date of build is included in the version, see init version.c : and UTS_VERSION is defined in include/li…
How do I use the linux flock command to prevent another root process from deleting a file?
I would like to prevent one of my root processes from deleting a certain file. So I came across the flock command, it seems to fit my need, but I didn’t get its syntax. If I only indicate a shared lock, it doesn’t work: If I add a timeout parameter, it still doesn’t work: It seems that way, …
Sorting a tab delimited file
I have a data with the following format: Now I tried to sort the file based on the last field decreasingly. I tried the following commands but it wasn’t sorted as we expected. What’s the right way to do it? Here is the sample data. Answer Using bash, this will do the trick: Notice the dollar sign …
Authenticate linux based user in java
I have a username and password for a particular user in Linux i need to verify that if the user is valid or not using java? Abdul Khaliq Answer The Java way to do this would be JAAS, but you’ll still need a LoginModule that works with Linux. Here’s a beta implementation that claims to work.
re-initialize / reconnect a terminal after network interruption
I have what is probably a very simple terminal related question. I’m running Ubuntu 8.10 Intrepid Ibex, using Gnome, and I often open a terminal-based ssh session only to have it dropped at some point later on. Once the session is dropped the terminal becomes unusable, obviously because the network conn…
What is the best free SQL GUI for Linux for various DBMS systems [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 years ago. Improve this question As I make the full switch from Windows to Linux (CentOS 5) I’m in search of the best free GU…
Find the IP address of the client in an SSH session
I have a script that is to be run by a person that logs in to the server with SSH. Is there a way to find out automatically what IP address the user is connecting from? Of course, I could ask the user (it is a tool for programmers, so no problem with that), but it would be cooler if
Padding Empty Field in Unix Join Operation
I have two files where I want to perform union operation based on 1st column: file1.txt file2.txt The result I hope to get is like this: where the empty fields of column 1 is padded with “-“. But why this join command doesn’t work as I expected? What’s the right way to do it? Answer &#…
Redirecting packets to user space TCP stack without modifying application
I’m using a user space TCP stack based on the Linux stack running under Linux. Unfortunately it requires applications to specifically call its own modified versions of the normal sockets API functions and then just grabs incoming packets it receives in response using libpcap. Now my question is whether …