1
vote
2answers
115 views

Can I find the list of ports being listened by a process ordered by the time of opening?

I know I can see the list of open ports using the lsof command. I am trying to view the results ordered by timestamp of listening. The process opens multiple (~6) ports and I suspect the order of ...
0
votes
2answers
129 views

why does sudo su; su tomcat doesn't switch to tomcat user?

In Redhat linux. from my user if I issue command sudo su -> changes to root su tomcat --> changes to tomcat user Why does tailing the commands in single line doesn't work? sudo su; su tomcat --> stil ...
2
votes
1answer
159 views

Bash: two commands in dollar-parenthesis don't have same behavior

I don't undertsand why, in Bash: echo $(hostname --fqdn) works, echo $(id -un) doesn't (id: –un: No such user). Backticks give the same results. Is there some good practice for using this ...
3
votes
0answers
137 views

Meaning of requeues of tc command

I ran this tc bellow and it outputs requeues with high number, do you know what this requeues means? By the way, it keeps increasing over the time. I look at man tc but I couldn't find anything. $ ...
0
votes
1answer
73 views

Create Logfile for all fired commands on server

I want to maintain logfile for all fired command on server. We have more than 3 admins and I want to monitor all commands which are fired by these. Is it possible ?
-1
votes
1answer
57 views

Lost access to my Virtual Machine on linux server pool after I used sys-unconfig command as root

the network admin gave me an IP address for Red-hat VM on his linux server pool; but lately I used the "sys-unconfig" command as a "root" user, and now I lost my access to the V-Machine; I cannot ...
0
votes
2answers
177 views

How to run Linux system commands from web interface?

I'm looking for a clean and secure way to run specific Linux system commands from a web interface. Let's say I would like to sudo -u differentuser ping 0.0.0.0. The IP address is supplied by user in ...
3
votes
1answer
714 views

Why does rsync forks itself? And why one such forked process is almost kinda idle (as seen in iotop)?

This is referring to the matter stated here and I am also experiencing the same. In one of my servers, I ran an rsync, to backup a huge directory (size greater than 300 Gb) to a different disk, ...
3
votes
1answer
184 views

Is there any difference running dhcrelay with multiple process or single process?

I want to ask about dhcreay running mechanism. We can run dhcrelay with two command, then it will run as 2 process dhcrelay -i eth3 172.16.17.3 dhcrelay -i eth1 172.16.17.5 #ps ax | grep dhcre 26464 ...
0
votes
3answers
128 views

How to check the number of requests being served by server

Can any one help with the command to check the number of requests being served by apache web server. I know some commands to test the load of server, like top command to check the load on server and ...
1
vote
2answers
710 views

Meaning of killall -0

I see from many place the follow command is used to check if a process exists, e.g. killall -0 nginx But from the documentation I can't see anything related to this argument, can anyone explain?
0
votes
1answer
193 views

how to wrap the command1 return strings with single/double quotation marks (\'or\") to feed to the next command2? [closed]

For example, I want to use mplayer to play the music of several dirs, type like this in bash: $find './l_music/La Scala Concert 03 03 03' './l_music/Echoes The Einaudi Collection' ...
2
votes
2answers
1k views

How to show high usage user's username with the top command, if the username is too long?

I'm having problem identifying high usage users on a shared Linux machine. I use the "top" command and it does show which commands are using the most CPU. But the usernames on this server all start ...
9
votes
2answers
9k views

How to check if a RSA public / private key pair matched

I have two files, id_rsa and id_rsa.pub, what command can be used to validate if they are the valid pair.
0
votes
1answer
326 views

Adding Linux kernel command line parameters

I would like to increase the size of the vmalloc region from the default value, and pass vmalloc= as a command line parameter while booting. I am booting a uImage. In which file do I need to add the ...
0
votes
2answers
1k views

finding files on linux in non hidden directory

In the following command i want to search only only the directories which are non hidden how can i do this using the following command .Iwant to ignore hidden directories while searching the log file ...
5
votes
1answer
2k views

Whats “Birth” field in stat command output

I'm using Fedora-16 with ext4.Suddenly with stat command I can see something called "Birth". # stat history_file1.txt File: `history_file1.txt' Size: 8944 Blocks: 24 IO ...
2
votes
2answers
157 views

What does this command do on Linux? It is eating my CPU.

I have a VPS and I am hosting a game site on it. Recently my CPU went to 3000% and memory is going near full. When I checked the processes I found this process eating the CPU: Pid-1571 (Trace) ...
2
votes
3answers
978 views

Calculate highest time difference between log message in /var/log/messages

I need to calculate time difference between two log messages of /var/log/messages. As we know log messages prefixed by date & time , i want time difference between two log entries.
2
votes
2answers
109 views

how to browse a folder named '-' in linux machine

I have created a directory named - [root@server50 public_html]# mkdir - [root@server50 public_html]# ls -al drwxr-xr-x 2 root root 4096 2011-03-16 02:22 - How can I enter the directory ...
2
votes
5answers
2k views

How to log commands/logins in linux?

I'm feeling that some people are using the root, how i can log all commands and connections times including ips made to the server (ssh) from all users? history command is not enough
0
votes
1answer
103 views

Super simple question about about command line '$ node example.js'

So I'm working on my first node.js 'Hello World' on a linux machine and I successfully got everything going by running $ node example.js I went to the browser and everything worked fine. Going ...
0
votes
4answers
296 views

Removing old cache files - command help

I'm trying to write a command to help clear up old cache asset files. The files are always either .css,.javascript,.css.gzip or .javascript.gzip and i want to delete all files older than 2 days old. ...
6
votes
3answers
440 views

Run shell script on a command

I want to run a shell script when date -s <string> command is used. For example i want to log the command to the file /tmp/user.log by executing the following command in the shell script ...
5
votes
1answer
1k views

Installing a php extension (xdiff) from pecl on Linux

I was getting this error on my php script: Fatal error: Call to undefined function xdiff_file_diff() I realised that I didn't had the xdiff extension installed. When I tried to install it using the ...
1
vote
4answers
2k views

Changing the shell (using chsh) via the command line in a script

In a startup script that sets up a machine, I want to run chsh -s /bin/zsh However, this asks for the user's password. How do I pass in the password as a parameter? Or if I have sudo power, can I ...
0
votes
4answers
324 views

What is the best Linux comand line server monitoring tool [closed]

I have a desktop at my house that has a SSH shell running htop that i use to keep an eye on my remote server. Do you know of any other tools that run in a shell that give more of an overview of the ...
3
votes
3answers
2k views

Linux: cat with separators among files

In Linux if you type cat *, you will get something like this: line1 from file1 line2 from file1 line1 from file2 line1 from file3 line2 from file3 line3 from file3 What I would like is to display ...
0
votes
2answers
318 views

How do I do a nxdomain check?

my friend says this, but it doesn't work as it says "dig command not found" dig ns <domain>
1
vote
4answers
995 views

Create file with variable value in Unix

How can I create a file in unix or linux based on variable value ? Ex: If I store date in a variable in linux, YESTERDAY=`date --date='1 day ago' '+%d-%m-%Y'` it will store value to YESTERDAY as ...
0
votes
2answers
198 views

Best way to schedule a task that is be excuted years later

What is the best way to schedule a task that is be executed years later? Like execute a script after 4 years. Is cron the best method for that?