Commands by YouM (2)

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

Single use vnc-over-ssh connection
This command 1. SSH into a machine 2. Tunnels VNC port to your local computer ("-L 5900:localhost:5900") 3. Runs a single use vnc server ("x11vnc -safer -localhost -nopw -once -display :0") 4. Goes into the background ("-f") 5. Runs VNC viewer on the local computer connecting to the remote machine via the newly created SSH tunnel ("vinagre localhost:5900")

Backup a file with a date-time stamp
Appends the input file with the date format YYYY-MM-DD.bak. Also runs silently if you remove the -v on the cp at the end of the function.

Show the UUID of a filesystem or partition
Shows the UUID of a filesystem or partition that can be used in kernel root options and in fstab. Run it without the -u option to generate more information. eg: ~/ sudo vol_id /dev/sda2 ID_FS_USAGE=other ID_FS_TYPE=swap ID_FS_VERSION=2 ID_FS_UUID=27fca13d-97b7-4d28-882c-6d03353f0a82 ID_FS_UUID_ENC=27fca13d-97b7-4d28-882c-6d03353f0a82 ID_FS_LABEL= ID_FS_LABEL_ENC=

Create a file of a given size in linux
if the fs support sparse file,using truncate can create sparse file. http://en.wikipedia.org/wiki/Sparse_file

Show apps that use internet connection at the moment. (Multi-Language)
Show apps that use internet connection at the moment. Can be used to discover what programms create internet traffic. Skip the part after awk to get more details, though it will not work showing only unique processes. This version will work with other languages such as Spanish and Portuguese, if the word for "ESTABLISHED" still contain the fragment "STAB"(e.g. "ESTABELECIDO")

Calculate days on which Friday the 13th occurs
I removed the dependency of the English language

Download a file and uncompress it while it downloads
This will uncompress the file while it's being downloaded which makes it much faster

most used unix commands

a function to find the fastest DNS server
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.

enable all bash completions in gentoo


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: