Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to find zero byte files

 ls -l | awk '{ if($5==0) print $9}' 

expalin :
 ls
-rw-rw----    1 nkumarachchi2019 nkumarachchi2019        0 Dec 15 16:47 jobs.cancel
$5 th column is zero bit 
if $5 is == 0 print $9 is file path

ls -lh human readable format

 
PREVIOUS NEXT
Tagged: #find #byte #files
ADD COMMENT
Topic
Name
8+6 =