Hide-and-Seek is one of the greatest games in the parent's arsenal. Your kid runs off and hides for several minutes, while waiting for you to find him/her. This gives you time to catch a breath and check your email without feeling like a loser. If you'd also like to take advantage of the counting time--claiming that thinking space as your own--use this command on your OSX terminal to maximize downtime. Also, if your kid is like mine, you can get away with "for i in {1..100};" :)
This command deletes all files in all subfolders if their name or path contains "deleteme".
To dry-run the command without actually deleting files run:
find . | grep deleteme | while read line; do echo rm $line; done
see aticonfig --help
^V means CTRL-V [ENTER] means ENTER key
Shows the current directory and those below it in a simple tree structure. Recommended use: alias lt='$command_above'
A much shorter version of this command.
Original submitter's command spawns a "grep" process for every file found. Mine spawns one grep with a long list of all matching files to search in. Learn xargs, everyone! It's a very powerful and always available tool.
Another simple way to get external IP or use: wget -qO- http://ipecho.net/plain
I can remember "cp -av" on Unix like systems to copy files and directories. The same can be done on Windows without extra software, somewhat.
The switches mean:
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/H Copies hidden and system files also.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/F Displays full source and destination file names while copying.
I don't type that all the time, I stick it into a file called "cpav.cmd" and run that.
echo xcopy /e/h/y /z/i /k /f %1 %2 > cpav.cmd
cpav zsh zsh2
http://support.microsoft.com/kb/323007
Show Sample Output
I use this command to select a random movie from my movie collection.. Show Sample Output
greps your bash history for whatever you type in at the end returning it in reverse chronological order (most recent invocations first), should work on all distros. works well as an alias
This command loops over all indexes of the system variable array ARRAY[] and puts its content into %A.
Create this array before, e.g. by
set ARRAY[0]=test1
and
set ARRAY[1]=test2
For using inside of a batch file, write %%A instead of %A.
Show Sample Output
The same thing using only Bash built-in's. For readability I've kept the variables out, but it could me made extremely more compact (and totally unreadable!) by stuffing everything inside the single echo command.
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: