Commands by pkufranky (3)

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

Restart X11 with HUP signal

Setup a persistant SSH tunnel w/ pre-shared key authentication
This creates a persistent ssh -i /path/to/key -ND local-IP:PORT [email protected] connection. You may have to install autossh. -f puts in daemon mode. if you are having trouble, try it without -f.

check open ports without netstat or lsof

Virtual Console lock program
vlock command locks the current console by default. Also you can lock all the consoles on the server by using -a parameter. For details, pl man vlock. ps: Generally speaking , system will not install vlock programme . So you should use ' $ sudo apt-get install vlock ' to install vlock .

Displays the number of processes per state

Perl One Liner to Generate a Random IP Address

Export a subset of a database
Limits the number of rows per table to X

Rename files in batch

Get line count for any file ending with extension recursively rooted at the current directory.

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


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: