Use find's exec and reduce the need for multiple evals with a progn wrapper.
First use ls -i to list files and directories with their inode number Then if you want to change to one of the directories, replace inode_no with its inode then execute the command Show Sample Output
This command is recursive and will delete in all directories in ".". It will find and delete all files not specified with ! -name "pattern". In this case it's file extensions. -type f means it will only find files and not directories. Finally the -delete flag ask find to delete what it matches. You can test the command by running it first without delete and it will list the files it will delete when you run it. Show Sample Output
When you right click a text box in Firefox and you have installed a few dictionaries you'll see a loooong list of spellcheckers. Most of them are duplicated (symlinks). This command deletes de duplicates and reduces the list.
you can change the size :)
create the "newer than" file by: touch -t 201011151300 ./201011151300.txt the format for the time is [[CC]YY]MMDDhhmm[.SS] Show Sample Output
This command will a particular folder-name recursively found under the src-path-to-search to the dest-path-to-copy retaining the folder structure
Extract in the current directory the content of all parted archives. Use the same password for each one.
Output made so that it will match initial suggestion for this task. Personally, I think that output of du -h is more readable.
Using ghostscript instead of imagemagick to convert pdfs into pngs. It keeps pngs with pdfs
find the files locked by rcs utility Show Sample Output
per comments
Will work with filenames with spaces inside. Will not break in case of someone making directory that matches *.pm. And sorts from largest. Where largest is file size, not line count.
Computes total size of files in a directory. This value is different "du -b" because doesn't includes directory sizes. Show Sample Output
Smaller Code Better Runtime
must be in the directory containing the track outputs to ~ but could be replaced with whatever you like e.g. ~/music/
This is for bash - make an alias - also a good blueprint for making aliases that take arguments to functions. If for Solaris use "-size +${1}000000c" to replace "-size +${1}M" 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: