if you have less free inode space alert in your monitoring app you can use this command to find the any directory with too many files and subdirectory . Show Sample Output
This uses bash's Process Substitution. It is necessary to give the full path of the file, thus why the filenames are filtered through realpath. In theory, this command should also work with mplayer and mplayer2 (using -playlist instead of --playlist). Modifications: - You can search specific directories by inserting them between "find" and "-type". - Edit the parameter of "-iname" to change the type of file searched for. - Remove everything after "realpath" to play the files in order.
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
I wanted to count and display the top directories containing JavaScript files in some of my project. Here it is. Maybe it can be written to more simply syntax by using find -exec...
I know 'sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4' is much more familiar. However, before sort 8.4 which is built-in with CentOS 6.x, use 'sort -V' is 15 times faster. In CentOS 7 with sort 8.22 there is no obviously difference. Show Sample Output
Prints the sizes of all the subdirectories (sorted by size), similar to Treesize utility. https://superuser.com/questions/554319/bash-display-each-sub-directory-size-in-a-list-format-using-1-line-command Show Sample Output
i'm using -x : -x, --one-file-system skip directories on different file systems so mounts points aren't walked trough Show Sample Output
Finds javascript lodash/underscore methods in source code. It's not perfect as can be ascertained from the last entry in the output. Would be interested if somebody improves this. Show Sample Output
This version accounts for the MiB/KiB suffix output by pacman these days.
a quick function for searching changed files. just copy it in the bash Show Sample Output
I couldn't find movie library on any of the SQLlite Stremio databases, but on ~/.config/stremio/backgrounds2 the background image filenames corresponds to IMDB URL. So I foreach files and wget HTML title of each movie and save it to a file. This will retrieve all movie names, not just the Library.
Display a list of the 16 most recently installed RPM packages with newest first. Show Sample Output
find all files that have 20 or more MB on every filesystem, change the size and filesystem to your liking
This command lists all currently installed packages in ubuntu in a single line, for example to use later with apt install. Show Sample Output
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: