Advanced Linux Commands

These are some of the commands I use regularly, along with some helpful information about them.

cp -p filename1 filename2

The -p option preserves the creation date rather than giving filename2 the current date.

ps --ef

The --ef options include PPID (parent PID). This lets user find the "mother" of a succession of processes. Useful to kill the PPID, which kill them all at once.

tail -f filename

The -f option keeps the command open and lets each new entry to filename to be displayed.

Command stacking

Command stacking allows you to execute commands one after the other, in order. To stack commands, use a semicolon (;) between commands, like this:

cd /etc ; ls -l

Be very careful when command stacking, especially when deleting or moving files! Make sure what you typed is what you want!

WebSanity Top Secret