Check These Out
This allows the output to be sorted from largest to smallest in human readable format.
These commands will mark a file as hidden or visible to Mac OS X Finder. Notice the capitol V vs the lowercase v. This will also work for directories.
setfile -a V foo.bar; // This marks the file invisible
setfile -a v foo.bar; // This marks the file visible
I have also found that adding the following aliases are helpful:
alias hide='setfile -a V'
alias show='setfile -a v'
wget/curl/friends are not good with mirroring files off websites, especially those with Apache-generated directory listings. These tools endlessly waste time downloading useless index HTML pages. lftp's mirror command does a better job without the mess.
The above url contains over 6700 of the common ad websites. The command just pastes these into your /etc/hosts.
if you want to move with command mv large list of files than you would get following error
/bin/mv: Argument list too long
alternavite with exec:
find /source/directory -mindepth 1 -maxdepth 1 -name '*' -exec mv {} /target/directory \;
This command works by rsyncing the target directory (containing the files you want to delete) with an empty directory. The '--delete' switch instructs rsync to remove files that are not present in the source directory. Since there are no files there, all the files will be deleted.
I'm not clear on why it's faster than 'find -delete', but it is.
Benchmarks here: https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html
I always add this to my .profile rc so I can do things like: "vim *.c" and the files are opened in tabs.
Bash has a built-in time command which provides less functionality than the real time command. Thus we reference /usr/bin/time directly.
Since the command isn't very easy to remember you could alias it to something like "cputime" or even just "time".
This command list and sort files by size and in reverse order, the reverse order is very helpful when you have a very long list and wish to have the biggest files at the bottom so you don't have scrool up.
The file size info is in human readable output, so ex. 1K..234M...3G
Tested with Linux (Red Hat Enterprise Edition)