for i rang(10) = length of the password random.choice("abcdefghijklmnopqrstuvwxyz...") = char allowed into the password Thanks Python/Django FAQ's. Show Sample Output
Converts all the png files in a directory to a bunch of gifs - changing only the file extension. Converts them in parallel - simply change the '4' to match the number of CPUs you have, or the number you want to dedicate to the conversion process.
Copies command output to clipboard or selection, in this example, the current path, by output of "pwd" command. Use xclip -i to copy to primary selection instead of clipboard, for example. Allowed values for -selection parameter are: buffer-cut, clipboard, primary and secondary
Just change /dev/sda1 to whatever your partition of interest is. This snippet should do the rest. Show Sample Output
ulimit [-SHacdflmnpstuv [limit]] Provides control over the resources available to the shell and to processes started by it, on systems that allow such control. The -H and -S options specify that the hard or soft limit is set for the given resource. A hard limit cannot be increased once it is set; a soft limit may be increased up to the value of the hard limit. If neither -H nor -S is specified, both the soft and hard limits are set. # jumps straight to the definition of ulimit in the bash man page. Show Sample Output
You need: pxz for the actual work (http://jnovy.fedorapeople.org/pxz/). The function could be better with better multifile and stdin/out support.
reverse of my previous command 10006 Show Sample Output
Provides a much cleaner, easier to read output than the closest alternative, ls -1R. This alternative makes it easier to differentiate directories from files: find . -printf '%y %p\n' | perl -ne 'if( m/(\w) (.*)\/(.*)/ ) { $t = $1; $p = $2; $f = $3; $t =~ s/[^d]/ /; $p =~ s/[^\/]/ /g; $p =~ s/\//|/g; print "$t $p/$f\n"; } elsif( m/(\w) (.*)/ ) { print "$1 $2\n"; } else { print "error interpreting: \"$_\"\n"; }' Show Sample Output
this example describe how make custom query with boolean expression for search an package in gentoo Show Sample Output
When a ssh connection with a remote server hangs or the connection is lost you can drop back to you local shell executing this key sequence.
Advanced information about RAM.
Does a search and replace across multiple files with a subgroup replacement.
Some PDF viewers don't manage form fields correctly when printing. Instead of treating them as transparent, they print as black shapes.
Uses "locate" instead of "find", "sort -u" instead of "sort | uniq" and it's case insensitive. Show Sample Output
Trying to check for an open port and missing netcat or nmap? This is the lowest common denominator way to verify a port is accessible from one server to another. This will give you a pretty quick return of 0 if it works. If it fails, it will just hang and takes awhile to timeout. I usually ctrl+c the command. "echo ?$" will give you an exit code other then 0 after you exit. Show Sample Output
Added gdb & other usefull stuff Show Sample Output
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: