Commands tagged urpmi (1)

What's this? 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

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Send an http HEAD request w/curl

rsync over ssh using alternative port number
Useful, when you need to backup/copy/sync a folder over ssh with a non standard port number

Number of commits per day in a git repository

A child process which survives the parent's death (for sure)
Test scenario: * Open xterm (or konsole, ...) * Start xeyes with: ( xeyes & ) * Close the xterminal The xeyes process should be still running.

replace a character/word/string in a file using vim
Replace all ocurrences in the file. The g option is to replace more than one occurrence in the same line. Whitout the g option, it only replace the first occurrence in the line.

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

Set laptop display brightness
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video). $ cat /proc/acpi/video/VGA/LCD/brightness to discover the possible values for your display.

Encrypt every file in the current directory with 256-bit AES, retaining the original.
The password is stored in the password file, which obviously must be kept secure, encrypted later with gpg, deleted, or whatever you prefer. To decrypt: $ openssl enc -d -aes-256-cbc -salt -in filename.enc -out filename -pass file:/path/to/password-file Alternative ciphers can be used, of course.

Find last modified files in a directory and its subdirectories
Goes through all files in the directory specified, uses `stat` to print out last modification time, then sorts numerically in reverse, then uses cut to remove the modified epoch timestamp and finally head to only output the last 10 modified files. Note that on a Mac `stat` won't work like this, you'll need to use either: $ find . -type f -print0 | xargs -0 stat -f '%m%t%Sm %12z %N' | sort -nr | cut -f2- | head or alternatively do a `brew install coreutils` and then replace `stat` with `gstat` in the original command.

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.


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: