This uses urandom to produce a random password. The random values are uuencoded to ensure only printable characters. This only works for a number of characters between 1 and 60. Show Sample Output
This command defragment the SQLite databases found in the home folder of the current Windows user.
This is usefull to speed up Firefox startup.
The executable sqlite3.exe must be located in PATH or in the current folder.
In a script use:
for /f "delims==" %%a in (' dir "%USERPROFILE%\*.sqlite" /s/b ') do echo vacuum;|"sqlite3.exe" "%%a"
Show Sample Output
This is a quick hack to make a gcc caller. Since it runs with gcc instead of tcc, it's a bit more trustworthy as far as the final answers of things go. Show Sample Output
use today's time stamp to make a unique directory for today or an hour ago ... Show Sample Output
Depends on zsh and gst123 ( http://space.twc.de/~stefan/gst123.php ) cd in_your_music_root_folder and then issue the command
Remove annoying improperly packaged files that untar into the incorrect directory. Example, When you untar and it extracts hundreds of files into the current directory.... bleh.
the last person who posted used the most roundabout way to concatinate files, there's a reason there's a "conCATinate" command... Using this method, you also get to choose the order of the files, below another person just did *.txt > combined.txt which is fine but the order depends on the implementation of "cat" which is probably alphabetical order of filenames. Show Sample Output
Of course, the httpd can be replaced with any other process name Show Sample Output
# # ####### # # ####### # # ####### ###### # ###### # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ####### ##### # # # # ### # # # # # ###### # # # # # # # # # # ### # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ####### ####### ####### ####### # ## ## ####### # # ####### ###### Show Sample Output
Watches for file modifications in the current directory and tails the file.
root@wow/var/spool/clientmqueue # rm spam-* /bin/rm: Argument list too long.
This command is more robust because it handles spaces, newlines and control characters in filenames. It uses printf, not ls, to determine file size.
friends don't let friends use Robocopy!
Takes a directory name as an argument (defaults to current directory if no arguments are given). Prints the newest file in the directory. Show Sample Output
This will copy the first 1MB of your /dev/sdX volume to your /root/sdX.bin file, where SDX is the name of the device you wish to copy the data from (Usually a hard disk) NOTE: Make sure you capitalize the M in field for BS. Show Sample Output
This command kills all wine instances and each EXE application working on a PC. Here is command info: 1) ps ax > processes = save process list to file named "processes" (we save it because we don't wont egrep to be found in the future) 2) cat processes | egrep "*.exe |*exe]" = shows the file "processes" and after greps for each *.exe and *exe] in it 3) | awk '{ print $1 }' > pstokill = saves processes PID's to file "pstokill" using awk filter 4) kill $(cat pstokill) = kills each PID in file pstokill, which is shown by cat program 5) rm processes && rm pstokill = removes temporary files Show Sample Output
Use the following key binding to search
----------------------------------------------------------------
ng
: Jump to line number n. Default is the start of the file.
nG
: Jump to line number n. Default is the end of the file.
/pattern
: Search for pattern. Regular expressions can be used. [/ = slash] Press / and then Enter to repeat the previous search pattern. Press ESC and then u to undo search highlighting.
n
: Go to next match (after a successful search).
N
: Go to previous match.
mletter
: Mark the current position with letter.
'letter
: Return to position letter. [' = single quote]
'^ or g
: Go to start of file.
'$ or G
: Go to end of file.
s
: Save current content (got from another program like grep) in a file.
= or Ctrl+g
: File information.
F
: continually read information from file and follow its end. Useful for logs watching. Use Ctrl+c to exit this mode.
-option
: Toggle command-line option -option.
h
: Help.
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: