most usefull when creating batch scripts using several usb drives and some commands like mkntfs needs a device name the -w option for grep is here to filter lines when you have multiple drives with the same volume label. Without this option, the grep command will return /media/KINGSTON /media/KINGSTON_ /media/KINGSTON__ Show Sample Output
Get external IP of the current machine via http://cmyip.com Show Sample Output
I use this command to select a random movie from my movie collection.. Show Sample Output
when you can do it , avoid pipe Show Sample Output
* ps -ef # list running processes * grep string * pull the process names from 8th field * cut and delimiter '/' * print 4th field * get rid of trailing grep * for loop killall -9 $i which is the process name Show Sample Output
find . -maxdepth 1 -iname ".*" | awk 'NR >= 2' Can be used to list only dotfiles without . nor .. Show Sample Output
After this command you can review doit.sh file before executing it. If it looks good, execute: `. doit.sh`
Muestra el crecimiento de un archivo por segundo. Cambia el texto "FILE" por el nombre del archivo a monitorear. Comando LS + AWK Show Sample Output
changes the PS1 to something better than default. [username.hostname.last-2-digits-of-ip] (current directory) Show Sample Output
Can pipe to tail or change the awk for for file size, groups, users, etc. Show Sample Output
Useful for removes a package and its depends, for example to remove the gnome desktop environment, also configuration files will be removed, you should be carefully and sure that you want to do this. Show Sample Output
This command might not be useful for most of us, I just wanted to share it to show power of command line. Download simple text version of novel David Copperfield from Poject Gutenberg and then generate a single column of words after which occurences of each word is counted by sort | uniq -c combination. This command removes numbers and single characters from count. I'm sure you can write a shorter version. Show Sample Output
Well this can come handy , when you don't feel like playing with pid rather if you know the process name say "firefox",it would kill it.The script given below would kill the process with its name given as first parameter , though not robust enough to notify that process doesn't exist , well if you know what you are doing that's wouldn't be a problem.:) ---- killhim.sh ---- #!/bin/bash ps -u $USER |grep $1 | awk '{ print $1}'| xargs kill ----
manda la salida de un comando hacia un servicio de paste y coloca la url de ese paste en el portapapeles
Build an awk array with all commands and then select a random one at the end. This avoids spawning extra processes for counting with wc or generating random numbers. Explicitly call /bin/ls to avoid interactions with aliases.
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.
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
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: