This is a discussion on List of Files within the Linux forums, part of the Operating Systems category; I am working with UNIX operating system and right now I am in the process of removing all unwanted files. ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
List of Files
I am working with UNIX operating system and right now I am in the process of removing all unwanted files. I want to get all zero bytes files stored in all directories listed so that I can delete all these at a shot. How can I get the list of all zero bytes files stored in all directories?
|
|
|||
|
For this you must write a shell script. In that first you must get the list of directories using ls command and pipe the output to find command given below as:
find /path/to/directory -size 0 -type f -exec rm -f {} \; Use the above in a loop until all directories are executed with the above command. This will remove all your zero bytes files stored in all directories in your UNIX operating system. |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 06:00 AM |
| comp.cad.autocad AutoLISP FAQ (part 2/2) - samples, code | Reini Urban | Tech FAQ | 0 | 06-01-2004 05:30 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 05-15-2004 06:00 AM |
| Apple II Csa2 FAQs: Uploading & Downloading, Part 21/25 | rubywand@swbell.net | Tech FAQ | 0 | 05-04-2004 09:01 AM |
| comp.cad.autocad AutoLISP FAQ (part 2/2) - samples, code | Reini Urban | Tech FAQ | 0 | 05-01-2004 05:30 AM |