Commands tagged find (410)

What's this?

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.

Share Your Commands


Check These Out

Fill the screen with randomly colored lines
This one-liner fills the screen with randomly colored lines.

Print a list of all hardlinks in the working directory, recursively
libpurple likes to hardlink files repeatedly. To ignore libpurple, use sed: | sed '/\.\/\.purple/d'

Safe Russian Roulette (only echo, don't delete files)
Shows "Bang!" in a chance of 1 out of 6, like in the original game with the gun (spin every round). Otherwise, echoes "Click...". If feeling brave you can also do: $[ $[ $RANDOM % 6 ] == 0 ] && echo 'Bang!' && a really killer command || echo 'Click...'

quickly rename a file

Find the package that installed a command

Tells which group you DON'T belong to (opposite of command "groups") --- uses sed
special thanks to XwZ :)

Print current runlevel
Prints current runlevel and system start time. On older systems it also shows the last init state. Pretty useful on remote systems, pretty useless on local ones :)

Backup files older than 1 day on /home/dir, gzip them, moving old file to a dated file.
Useful for backing up old files, custom logs, etc. via a cronjob.

Make a file not writable / immutable by root
http://linuxhelp.blogspot.com/2005/11/make-your-files-immutable-which-even.html

grep for tabs without using Ctrl-V trick
-P tells grep to use perl regex matches (only works on the GNU grep as far as I know.)


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: