Commands using cut (586)

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

Find processes stuck in dreaded "D" state aka IO Wait
Lots of fun to run on nfs clients when the server or network connection is having issues

Encode file path to URL
Really helpfull when play with files having spaces an other bad name. Easy to store and access names and path in just a field while saving it in a file. This format (URL) is directly supported by nautilus and firefox (and other browsers)

Extract a bash function
I often need to extract a function from a bash script and this command will do it.

Printing multiple years with Unix cal command
print multiple increasing years using cal - calendar -. You can also try $seq Start Increment End

Show git log beautifully
Only show a short of important information inline ( include branch info ), and color this log tree.

Using column to format a directory listing
Using column to format a directory listing

Poor's man Matrix script
This creates a matrix of letters that run forever until you hit Ctrl-C simulating "The Matrix" effect... just for fun :) You may want to try the -n and -y switch to change the "FX" LOL! e.g.: pwgen -ny 3

execute your commands and avoid history records
$ secret_command;export HISTCONTROL= This will make "secret_command" not appear in "history" list.

Write comments to your history.
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.

diff directories, quick cut and paste to view the changes
We use this to quickly highlight differences and provide a quick way to cut and paste the command to view the files using the marvellous vimdiff


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: