Permit to generate a password for userPassword in ldap. Use ?slappasswd -g? to generate a random passowrd. Show Sample Output
Removes special characters (colors) in '^]]Xm' and '^]]X;Ym' format from file. Use pipe ('input | perl [...]') or stream ('perl [...] You can use 'cat -v infile' as 'input' to show special characters instead of interpreting (there is problem with non-ASCII chars, they are replaced by M-[char]).
This command removes all ruby gems except the default ones that can not be removed. It is based on http://geekystuff.net/2009/01/14/remove-all-ruby-gems/
open a new tab in active gnome-terminal instance needs sudo apt-get install xdotool and sudo apt-get install wmctrl
This attempts to load a Perl Module (-M flag) and use version 9999, since no module has a version this high, Perl exits either a) telling you the version of the module installed or b) tells you it can't find the module. Show Sample Output
hgrep() { if [[ ${#} -eq 0 ]] then printf "usage:\nhgrep [--nonum | -N | -n | --all-nonum | -an | -na] STRING\n" return 1 fi while [[ ${#} -gt 0 ]] do case ${1} in --nonum | -N | -n | --all-nonum | -an | -na) builtin history | sed 's/^[[:blank:]]\+[[:digit:]]\{1,5\}[[:blank:]]\{2\}//' | grep -iE "(${*:2})" break ;; *) builtin history | grep -iE "(${*})" break ;; esac done } 'hgrep -n' helps in using full grep support, e.g. search for _beginning_ of specific commands, see example output Show Sample Output
It happened to me that I got a season of a tv-show which had all files under the same folder like /home/blah/tv_show/season1/file{1,2,3,4,5,...}.avi
But I like to have them like this:
/home/blah/tv_show/season1/e{1,2,3,4,5,...}/file{1,2,3,4,5,...}.avi
So I can have both the srt and the avi on one folder without cluttering much. This command organizes everything assuming that the filename contains Exx where xx is the number of the episode.
You may need to set:
IFS=$'\n'
if your filenames have spaces.
xwinwrap allows you to run any program in the root desktop pane. I like to run atlantis, it goes well against Fedora 10's blue sun background. At one time this also served a useful purpose for me as a workaround for a problem that would happen when the video card went into sleep mode.
Just added view with the eog viewer.
This command are using by me for checking connection with Internet. Show Sample Output
List all the machine ip's currently running on your network Show Sample Output
apg generates several random passwords. It uses several password generation algorithms (currently two) and a built-in pseudo random number generator. Show Sample Output
If /home/sonic/archive/ was a symlink to /backup/sonic/archive it would follow the links and give you the file listing. By default find will NOT follow symbolic links. The default behavior for the find command is to treat the symlinks as literal files. I discovered this when trying to write a script run via cron to delete files with a modification time older than X days. The easiest solution was to use: /usr/bin/find -L /home/sonic/archive -name '*gz' -type f -mtime +14 -exec rm '{}' \; Show Sample Output
Today, I needed to reboot a Windoze machine on another continent which had no shutdown or restart options via "Start" in the remote desktop (the only options available were: "Logoff, Disconnect, or Lock"). Fortunately, I found how to shutdown and restart from the command line.
-r to use extended regex ^ begin line | alternative get 100 or 0-9 one or two times 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: