Commands by casidiablo (2)

What's this?

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.

Share Your Commands


Check These Out

Throttle download speed (at speed x )
Throttle download speed $aria2c --max-download-limit=100K file.metalink Throttle upload speed $aria2c --max-upload-limit=100K file.torrent

uniq without pre-sorting
Reads stdin, and outputs each line only once - without sorting ahead of time. This does use more memory than your system's sort utility.

cycle through a 256 colour palette
just for fun

List all global top level modles, then remove ALL npm packages with xargs

List PHP-FPM pools by total CPU usage

How to check network connection from one interface
This command only check the network connection from given eth. This is very useful if you are using more then one interface in your server or laptop.

Delete Last Line of a File if it is Blank
Use sed to remove the last line of a file only if it is empty.

Shortcut to find files with ease.
It looks for files that contains the given word as parameter. * case insensitive * matches files containing the given word.

Most used commands from history (without perl)
I copied this (let's be honest) somewhere on internet and I just made it as a function ready to be used as alias. It shows the 10 most used commands from history. This seems to be just another "most used commands from history", but hey.. this is a function!!! :D

Generate a random password 30 characters long
Find random strings within /dev/urandom. Using grep filter to just Alphanumeric characters, and then print the first 30 and remove all the line feeds.


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: