Commands by jmfork (1)

  • It suspends to RAM: you always need your batteries for the RAM but it saves time as there is no need to slowly archive everything on your hard disk. It works fine with me but if anyone has a nicer way, please contribute.


    -3
    sudo /etc/acpi/sleep.sh sleep
    jmfork · 2010-08-03 23:54:49 0

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

Display 16 largest installed RPMs in size order, largest first
Interesting to see which packages are larger than the kernel package. Useful to understand which RPMs might be candidates to remove if drive space is restricted.

Plaintext credentials sniffing with tcpdump and grep
Simple TCPDUMP grepping for common unsafe protocols (HTTP, POP3, SMTP, FTP)

Get mouse location (X,Y coordinates)

Download all videos in your Boxee queue
Gets all videos in your boxee queue with a URL associated with them and attempts to download each using get_flash_videos

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Current running process ordered by %CPU
Useful to detect which process is causing system loads. It shows process PID so as we can take further actions.

Push your present working directory to a stack that you can pop later
If are a Bash user and you are in a directory and need to go else where for a while but don't want to lose where you were, use pushd instead of cd. cd /home/complicated/path/.I/dont/want/to/forget pushd /tmp cd thing/in/tmp popd (returns you to /home/complicated/path/.I/dont/want/to/forget)

list block devices
Shows all block devices in a tree with descruptions of what they are.

Cleanup a (source) text file, removing trailing spaces/tabs and multiple consecutive blank lines
I used this command (in addition to a code formatting tool) to "cleanup" a bunch of PHP files

distribution specific information


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: