Commands by tuanmeo (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

Do Google search from that command line opening into a new Firefox tab.
Usage: google "[search string]" Example: google "something im searching for" This will launch firefox and execute a google search in a new tab with the provided search string. You must provide the path to your Firefox binary if using cygwin to $ff or create an alias like follows: alias firefox='/cygdrive/c/Program Files (x86)/Mozilla Firefox/firefox.exe' Most Linux flavors with Firefox installed will use just ff="firefox" and even OSX.

git remove files which have been deleted
It deletes all removed files, updates what was modified, and adds new files.

Removing Prefix from File name
Removing Course name prefix added

Undo commit in Mercurial

Averaging columns of numbers
This example calculates the averages of column one and column two of "file.dat". It can be easily modified if other columns are to be averaged.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Stripping ^M at end of each line for files

List all groups and the user names that were in each group
"cut" the user names from /etc/passwd and then running a loop over them.

Count Files in a Directory with Wildcards.
Remove the '-maxdepth 1' option if you want to count in directories as well

Read just the IP address of a device


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: