I have thousands of text files and would like to know how to check if a particular file is empty. I am reading all the files using this line of code
Y<-grep(\
find . -empty
or
find . -empty |awk -F\/ '{print $FN}'
If you want to limit just txt files:
find . -empty -name "*.txt"
If you want only asci files (not just .txt)
find . -empty -type f
put it all together:
find . -empty -type f -name "*.txt" |awk -F\/ '{print $NF}'