Start an interactive program with perl code expansion. Everything between #[ ] is evaluated as perl code. #[ ] tags must not be nested (it wouldn't make sense anyway). Show Sample Output
Removes files and dirs lilsted by the tar tf command. Errors may occur because of dirs deleted before children.
Give the space freed before delete files. Only delete files go to free space. Files with mora than 1 link, don't free space. Show Sample Output
Useful if your Docker host starts running out of disk space due to Docker debris. You should start by running "sudo docker ps" in order to check that all required containers are in fact running, and fix any that aren't before proceeding to the main event! "sudo docker rm $(sudo docker ps -q -f status=exited)" removes all containers which are no longer running. "sudo docker rmi $(sudo docker images -q -f dangling=true)" removes all Docker images not required for currently running containers.
I needed to find a command to delete huge numbers of files without intensive cpu load, that command does the job :) The purpose of "+" at then end of the line, tells rm to delete multiple files at once
Very useful to get rid of backup files or wrong extension files that lure in your folders In this example first I do two searches for all filenames of the two extensions .jpg and .png, then delete the extension and only output the now duplicate files. I loop with these results and print a log and delete the file with the extension I dislike. Show Sample Output
makes sure not to skip children nodemodules credit: https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively
Find more info about this hack on my github https://github.com/wuseman/TG799VAC-XTREME-17.2-MINT - Setup a netcat listener 'nc -lvvp 1337' and then from dns field on your technicolor router run the command below and turn dns ON and wait for the magic.. Show Sample Output
remove all files in /home/ folder that starts with bk_all_dbProdSlave and not created in the last 2 days
Will delete empty directories and sub-directories (hideen too = whose names are starting with dot .). Used 'rm' command instead of 'rmdir' to give the possibility of asking for confirmation before deleting i.e. it is not wise do delete all empty directories in /etc folder. Replace dot in 'find .' with any for other starting directory instead of current. in 'rm -i -R' 'i' stands for ask before delete and 'R' for delete folder recursively or folder itself if it is empty
This runs a command continuously, restarting it if it exits. Sort of a poor man's daemontools. Useful for running servers from the command line instead of inittab.
Some malicious program appends a iframe or script tag to you web pages on some server, use this command to clean them in batch.
man find: If no paths are given, the current directory is used. - Can anybody tell me why so many people are typing the dot?
This is a slight variation of an existing submission, but uses regular expression to look for files instead. This makes it vastly more versatile, and one can easily verify the files to be kept by running ls | egrep "[REGULAR EXPRESSION]"
The thunderbird message datastores get corrupt some times causing random failures, compaction to fail and general suck in thunderbird. Removing them causes thunderbird to rebuild the indexes and makes things quick again.
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: