Posts Tagged With: find

Remove SVN Info from a Folder

Tagged with: , , , ,

This command removes the SVN data from a folder.


find -name .svn -exec rm -rf {} \;
1 Comment »

Exclude Removable Partitions from a ‘find’ Search

Tagged with: , , , , ,

Search files with ‘.rpm’ extension ignoring removable partitions as cdrom, pen-drive, etc.


find / -xdev -name \*.rpm
No Comments »

Find New Files

Tagged with: , , , , , ,

Search files created or changed within 10 days


find /usr/bin -type f -mtime -10
No Comments »

Copy all Txt Files

Tagged with: , , , , , ,

Find and copy all files with ‘.txt’ extention from a directory to another


find /home/binnyva -name '*.txt' | xargs cp -av --target-directory=/home/backup/ --parents
No Comments »

Remove all EXE files

Tagged with: , , , , , ,

Removes all exe files in the current directory tree. Useful to clear virus from flash drives.


find . -name "*.exe" -delete
2 Comments »

Searching text in a directory using find and grep

Tagged with: , , , , , , ,

Use find and grep to search for a specific text in a directory. In this example, we search for files which uses the PHP short tag - <?


find -name '*.php' -exec grep '<?[^p\=]' {} \;
No Comments »

Remove CVS Information from a Folder

Tagged with: , , , , , ,

find -name CVS -exec rm -rf {} \;

NOTE: Works only with bash

No Comments »