All commands (14,187)

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

return a titlecased version of the string[str.title() in python]

Perl one-liner to determine number of days since the Unix epoch
There are some environments that use this value for password and account expiration. It's helpful to be able to quickly determine the number of days since the Unix epoch (dse) when working directly with the configuration files as an administrator.

Create a new file

View webcam output using GStreamer pipeline
Open a window that displays camera capture. Framerate, width and height may be changed to match your needs.

Show interface/ip using awk
Interfaces like lo can be omitted from the beginning, there are probably better ways of doing this, i'm a noob at awk.

Debug pytest failures in the terminal
pudb is an ncurses debugger. This command will allow interactive debugging of test failures in pytest using pudb.

Make 'less' behave like 'tail -f'.
Using +F will put less in follow mode. This works similar to 'tail -f'. To stop scrolling, use the interrupt. Then you'll get the normal benefits of less (scroll, etc.). Pressing SHIFT-F will resume the 'tailling'.

Copy a file over SSH without SCP

determine if tcp port is open
@putnamhill, no need if statement in that case. && is a AND and || is a OR

ls not pattern
Negative shell globs already come with bash. Make sure to turn on extended pattern matching with 'shopt -e extglob'.


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: