How to display a file name which has zero bytes in size.
Answers were Sorted based on User's Feedback
Answer / safi
we can find using find command.
find / -size 0
This will print all files under / which has 0 size.
| Is This Answer Correct ? | 64 Yes | 1 No |
Answer / likhitha
#try this
#this will give you the answer
find /home/itsme -type f size 0
#this will display all 0 size "files" in /home/itsme
directory
#
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / sreehari ck
ls -l <location>
it will display all filenames exclude hidden file names
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / akula
ls -ltr | grep "^-" | sort -nk5 | head -1
or
ls -ltr | grep "^-" | sort -nk5 | head -1 | awk '{ print $9 }'
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rajdeep paul
We can find it in a different way also as shown below.
ls -lrtR |grep " 0 "
Although it is better to use find command here.
| Is This Answer Correct ? | 7 Yes | 8 No |
Answer / chinmayee
Hello
By touch command we can create zero byte file.
ex:touch file1 (creating a file)
cat file1 (displaying a file which size is zero)
check..........
| Is This Answer Correct ? | 13 Yes | 36 No |
How do you stop a running process?
in a growing log file how will you see the 1st 99 lines?
How to check whether some services are running in another server or not? Suppose i am currently in a server named A.I want to check whether some services are running in server B without logging into the server B.
3 Answers Amazon, MBA, Syntel, TCS, Unisys,
What is .sh file?
what is Online(STM) and offline diagnostics in HP-UX?
What do know about tee command?
In vi editor how do you execute unix commands?
What command is used to switching between users in unix?
What is the procedure of "at" and crontab" commands?
How we will execute previous command in vi editor?
What is the difference between cat and more command?
what do you understand by 'building block primitive'?