For easy directory traversal(good link)
bg, fg and jobs
To run the process in background, foreground and to see what are the current jobs running
file
strings
zgrep
Handy for searching the zip files
pgrep
Handy for searching the process list
pstree
The pstree command is another variation of the PS command. it gives a quick peek at the different programs that are running, and what processes stem from other processes
apropos
apropos is a very powerful command, as it knows every command you can use for a specific item.If you're looking for a certain command to run on, say, directories, but you can't quite remember what it's called, then running apropos dir will yield a list of possible commands.
touch
the touch command is for updating the access / modified date of a file; it’s just a nice side-effect that if the file doesn’t exist, it will create it.
curl
curl -O http://www.domain.com/path/to/download.tar.gz
The -O flag tells curl to write the downloaded content to a file with the same name as the remote file. If you don’t supply this parameter, curl will probably just display the file in the commmand line
patch
patch will be handy with diff
pgrep
pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria.
!!
This will execute the last command you used on the command line.
!...
Execute The Last Command Starting With ...
!ls:p
This will display the command instead of running it.
!$
You can use the last argument from the last command by refering to it as !$
!$:p
Instead of running the last word of the previous command this will print it out.
!*
This bang command will run the previous command without the first word. This one is also only really useful for substitutions as we see in the examples that follow.
!*:p
This will print the previous command without the first word.
$_
You can use the last argument from the last command by refering to it as $_
watch
watch runs a command repeatedly, displaying its output. This allows you to watch the program output change over time. By default, the program is run every 2 seconds. watch is very similar to tail.
Make Parent Directories the Smart Way
mkdir -p /home/adam/make/all/of/these/directories/ will create all directories as needed even if they do not exist.
Ctrl +
CTRL+U deletes whatever is to the left of the cursor and CTRL+K deletes what is to the right.
CTRL+C, which discards the current typed command, and gives you a new line.
CTRL+L will clear the screen.
CTRL+D logout of a terminal session
Resetting your session
Instead of killing and re-starting your terminal session, you can merely type the command reset. This will reset your terminal back to its defaults, clear the screen, and everything will be as it was before.
dmesg
wget
http://www.unixmen.com/linux-tutorials/484-wget-command-line-cheatsheet
lsof
Check for open file descriptors
Other Links
http://www.thegeekstuff.com/2010/11/50-linux-commands/
find command examples
http://blog.urfix.com/25-linux-commands/
Vi
http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know
http://www.atoztoa.com/2008/07/effective-use-of-vim-part-1.html
References:-
http://laptoplogic.com/resources/ten-powerful-linux-commands
http://net.tutsplus.com/articles/web-roundups/10-terminal-commands-that-will-boost-your-productivity/
http://blogs.techrepublic.com.com/10things/?p=452
http://www.atoztoa.com/2008/06/linux-commands-i-hardly-knew.html
http://codytaylor.org/2009/09/linux-bang-commands.html
http://www.canoo.com/blog/2010/12/22/beginner-bash-must-know-bash-commands/
Awesome Post! sudo !! Ravi
ReplyDelete