For those files in current folder that would be shown in `ls *ext`, for some extension ext, move/rename that file removing the .ext suffix from the file name. It uses Bash's parameter substitution, as seen in http://tldp.org/LDP/abs/html/parameter-substitution.html#PCTPATREF (for analog use in prefix, see http://tldp.org/LDP/abs/html/parameter-substitution.html#PSOREX2 )
combines mkdir and cd added quotes around $_, thanx to flatcap! Show Sample Output
Search in all html files and remove the lines that 'String' is found.
Find and kill multiple instances of a process with one simple command.
Loads your CPU, run a instance for each CPU/CORE.
Old drive with lots of music or unsorted drive? This command will play all mp3 files in a folder and after playing one song or pressing q, it will ask you if you want to delete the file.
use manpages, they give you "ultimate commands" "ls -SshF --color" list by filesize (biggest at the top) "ls -SshFr --color" list by filesize in reverse order (biggest at the bottom) Show Sample Output
If curl isn't available, use lynx.
use xdg-open without looking at error messages examples msg: (nautilus:3955): Gtk-WARNING **: Theme parsing error: Notebook.css:21:15: Junk at end of value
Replace D drive with mounted ISO virtual drive and Replace E with your USB drive letter.
avoid rm to be recursive until you complete the command: put the -rf at the end!
Useful for situations where you have word lists or dictionaries that range from hundreds of megabytes to several gigabytes in size. Replace file.lst with your wordlist, replace 50000 with however many lines you want the resulting list to be in total. The result will be redirected to output.txt in the current working directory. It may be helpful to run wc -l file.lst to find out how many lines the word list is first, then divide that in half to figure out what value to put for the head -n part of the command.
Good for finding outdated timthumb.php scripts which need to be updated, anything over 2.0 should be secure, below that timthimb is vulnerable and can be used to compromise your website. Show Sample Output
"play" is part of "SoX" SoX - Sound eXchange, the Swiss Army knife of audio manipulation. For details, see: man sox Show Sample Output
biggest->small directories, then biggest->smallest files Show Sample Output
It's useful mostly for your custom scripts, which running on specific host and tired on ssh'ing every time when you need one simple command (i use it for update remote apt repository, when new package have to be downloaded from another host). Don't forget to set up authorization by keys, for maximum comfort. Show Sample Output
I added this code to my .bashrc file
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: