Tip #232 Deleting difficult filenames
To delete a file who's file name is a pain to define (eg. ^H^H^H) find it's inode number with the command "ls -il". Use the line below to find and delete the file.Read more »
Tip #882 Find last modified files on a filesystem
To find the last modified files in a directory you can use ls -ltr. To find the last modified file on a file system it will not work, but the following command will work:Read more »
Tip #173 Count files by type
To find out the number of files of each type in your current directory try the following:Read more »
Tip #181 Remove empty directories
To remove empty directories (even if filenames or dirnames contain spaces or weird characters) from a tree you can do:Read more »
Tip #147 Find and Grep
Find all files with given name (you can use Bash expansion if you'd like), and Grep for a phrase:Read more »
Tip #209 Directory Tree
The following alias will print the directory structure from the current directory in tree format.Read more »
Tip #300 Find and replace on specific files
Selective content replace on files. For example to replace '<?' with '<?php' in all PHP files:Read more »
Tip #190 dos2unix all files in a directory
dos2unix requires the name of an input and output file so it can be hard to run on a list of files. The following gets around this and will run dos2unix on all files in a directory:Read more »
- TAGS:
- find
Tip #199 Find files by modified time
When specifying time with find options such as -mmin (minutes) or -mtime (24 hour periods, starting from now), you can specify a number n to mean exactly n, -n to mean less than n, and +n to mean more than n. 2 For example:Read more »
- TAGS:
- find
alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs