Commands by izharkorejo (0)

  • bash: commands not found

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

Install Linux Kernel Headers

Use top to monitor only all processes with the same name fragment 'foo'
top accecpts a comma separated list of PIDs.

"Pretty print" $PATH, separate path per line
from: http://www.unix.com/shell-programming-and-scripting/28047-split-print-path.html

Perl Command Line Interpreter
Read, Evaluate, Print, Loop - REPL

Create incremental backups of individual folders using find and tar-gzip
Problem: I wanted to backup user data individually, using and incremental method. In this example, all user data is located in "/mnt/storage/profiles", and about 25 folders inside, each with a username ( /mnt/storage/profiles/mike; /mnt/storage/profiles/lucy ...) I need each individual folder backed up, not the whole "/mnt/storage/profiles". So, using find while excluding directories depth and creating two variables (tarfile=username & desdir=destination), tar will create a .tgz file for each folder, resulting in a "mike_2013-12-05.tgz" and "lucy_2013-12-05.tgz".

Switch 2 characters on a command line.
If you typed 'sl', put the cursor on the 'l' and hit ctrl-t to get 'ls'.

Add prefix onto filenames
Best to try first with -n flag, to preview

Sprunge.us - CLI alternative to PasteBin.com
NAME sprunge: command line pastebin: SYNOPSIS | curl -F 'sprunge=

Fast, built-in pipe-based data sink
This is shorter and actually much faster than >/dev/null (see sample output for timings) Plus, it looks like a disappointed face emoticon.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"


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: