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.
simple find and exec example
This is useful for command line 'recycle bins' and such like
Remove annoying improperly packaged files that untar into the incorrect directory. Example, When you untar and it extracts hundreds of files into the current directory.... bleh.
This command kills all wine instances and each EXE application working on a PC. Here is command info: 1) ps ax > processes = save process list to file named "processes" (we save it because we don't wont egrep to be found in the future) 2) cat processes | egrep "*.exe |*exe]" = shows the file "processes" and after greps for each *.exe and *exe] in it 3) | awk '{ print $1 }' > pstokill = saves processes PID's to file "pstokill" using awk filter 4) kill $(cat pstokill) = kills each PID in file pstokill, which is shown by cat program 5) rm processes && rm pstokill = removes temporary files Show Sample Output
Best way I know to get rid of .bash_history and don't allow bash to save the current one on exit Edit: added ~/ before .bash_history, just in case... ;)
Remove your BASH history and then link it to /dev/null
Credit goes to "eightmillion" Show Sample Output
Assuming only VIM has *~ files in your current dir. If you have usefull data in a file named in the *~ pattern, DO NOT RUN this command!
Remove all zero size files from current directory. Its a not recursive option like: find . -size 0c -exec rm {} \;
Empty the trash when the icon stay in the non-empty state source: http://www.linuxquestions.org/blog/phoenixrising-455874/2009/3/3/how-to-empty-trash-in-gnome-when-the-trash-can-refuses-to-clear-1660/
gunzip all .gz file in current dir
This command will delete all files and folders except 'skipme'. it could be a file or a folder.
Never read the documentation? No, then why have that ~ 20 MB sit there and take up space? This command preserves directory structure wile removing all of those unnecessary help and documentation files. Works on Ubuntu, Debian, and most related systems. Gives a lot of directory errors, I'll fix those later.
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: