This directory also has a subdirectory B which also has some 0 byte files in it. The problem: I only need to find out the names of the 0 byte files in the directory A. I'm using the following command find. -name *.zip -size 0c This command not only lists the 0 byte files within dorectory A, but also lists the 0 byte files within directory B.
Active10 months ago
Bash Find Zero Size Files
How to find all zero bytes files in directory and even in subdirectories?
I did this:
..but I got only files in that directory, not all files,and if any file name had a space I got only the first word followed by a tab.
Can any one help me?
CivaCiva
3 Answersfind is an easy way to do this-:
Open Zero File
or if you require a long listing append the suspectussuspectus
-ls option
3,83666 gold badges2121 silver badges3131 bronze badges
find will include all files and directories under the paths given as parameters, filtering them based on rules given as additional parameteres. You can use
Liquid xml studio community edition 2009 ram. FREE Graphical XML Schema Editor and XML Editor.
Some
find implementations does not require a directory as the first parameter (some do, like the Solaris one) and will default to the current working directory (. ). On most implementations, the -print parameter can be omitted, if it is not specified, find defaults to printing matching files.
Gert van den BergGert van den Berg
Find Zero Size FilesJakujeFind Zero Size Files Windows
7,46155 gold badges2323 silver badges3030 bronze badges
![]()
TangoTango
Not the answer you're looking for? Browse other questions tagged linuxshell-script or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |