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

Debug your makefile
Say your dependencies specified in your Makefile (or dates on your source files) is causing 'make' to skip some source-files (that it should not) or on the other other end, if it is causing make to always build some source-files regardless of dates of target, then above command is handy to find out what 'make' thinks of your date v/s target date-wise or what dependencies are in make's view-point. The egrep part removes the extra noise, that you might want to avoid.

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

Another Matrix Style Implementation
A bit different from some of the other submissions. Has bold and uses all c printable characters. Change the bs=value to speed up and increase the sizes of the bold and non-bold strings.

which procs have $PATH_REGEX open?
faster than lsof by at least x2 on my box.

ascii digital clock
# ### ### # # ### ### # # # ## # # ### # # # # ### ## # # # # # # ### # # # # ### # # # # # ### ##### # # ##### # # # ### # # ### # # # # # ### # # ### # # ##### ### ### # ##### ### ##### #

Generate list of words and their frequencies in a text file.

Copy the contents of one partition to another

Encode a file to MPEG4 format
Encode video.avi into newvideo.avi using the libav codec to produce an MPEG4 file with a bitrate of 800

Rename files in batch

ssh batch jobs: query hundreds of hosts with an ssh command
Need to query hundreds of hosts with an ssh command ? Of course you'll have setup keys on all your remote HOSTs. But in the case a key is not present this command will skip that node, proceeding on to the next. -t: Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine. Also prevents unwanted stty messages being sent to console -q: Quiet mode. -o "BatchMode yes" If set to yes, passphrase/password querying will be disabled. This option is useful in scripts and other batch jobs where no user is present


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: