This command will show the sum total of memory used in gigabytes by a program that spawns multiple instances of itself. Replace chrome with whatever program's memory usage you are investigating. This command is rather useless on software that only spawns a single instance of itself. Show Sample Output
Recursive. Ignores non-media files. Requires ffprobe, paste, and bc. Show Sample Output
I occasionally need to see if a machine is hitting ulimit for threads, and what process is responsible. This gives me the total number, sorted low to high so the worst offender is at the end, then gives me the total number of threads, for convenience.
The paste command pastes lines from FILES. The -s option pastes lines from the same file. The -d option reuses the delimiter. This can be fed to bc to compute any large expression without fear of an overflow ;-). seq 1 100 | paste -s -d '*' | bc 93326215443944152681699238856266700490715968264381621468592963895217\ 59999322991560894146397615651828625369792082722375825118521091686400\ 0000000000000000000000 Show Sample Output
Adds up the used disk space on all hard drives that are directly connected to the machine (i.e. no network mounts etc.) Assumes there are no IDE drives present. Show Sample Output
For example to add up the disk usage at several disjoint locations. The $[..] is for arithmetic evaluation in bash. Alternatively pipe to the bc command. Show Sample Output
This version accounts for the MiB/KiB suffix output by pacman these days.
The Linux's `cal` command is nice, but there are times when I need to see two months side by side and this command will do it. Show Sample Output
A function for retrieving and displaying a list of synonyms for a German word or phrase. Show Sample Output
take a list of IP:PORT and output IP:PORT:COUNTRY Show Sample Output
This, like the other commands listed here, displays installed arch packages. Unlike the other ones this also displays the short description so you can see what that package does without having to go to google. It also shows the largest packages on top. You can optionally pipe this through head to display an arbitrary number of the largest packages installed (e.g. ... | head -30 # for the largest 30 packages installed) Show Sample Output
Add -n to last command to restrict to last num logins, otherwise it will pull all available history. Show Sample Output
Instead of tedious manual mv commands and tabbing, this routine creates a file listing all the filenames in the PWD twice, edit the second instance on each line to the new name, then save the file, the routine does the rest. Feel free to replace nano with your holy war editor of choice. You will get a lot of "mv: 'x' and 'x' are the same file" warnings, these could be cleaned up but the routine works.
# # ####### # # ####### # # ####### ###### # ###### # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ####### ##### # # # # ### # # # # # ###### # # # # # # # # # # ### # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ####### ####### ####### ####### # ## ## ####### # # ####### ###### 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: