How to display a file name which has zero bytes in size.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I search for text in vi?

577


Name the various commands that are used for the user information in unix.

534


Which command is used to find whether the system is 32 bit or 64 bit?

625


What is the first character of the output in ls l command?

625


What is the command to find maximum memory taking process on the server?

662






How does shebang work?

584


Write a command to display a file’s contents in various formats?

618


Explain ‘system calls’ with respect to unix commands?

596


What does awk stand for?

601


How can we use grep command in unix?

606


What is the pipe command?

570


What is the difference between cat and more command?

619


What is the use of awk command in unix?

570


What are the commands in UNIX to list the files in a Directory?

609


What does pipe () return?

585