I have a folder called work
and inside it I have 2 folders: p1
and p2
. How can I tell if the p1
and p2
folders are empty?
I have the following command
find . -type f -printf "%T@ %p\n" | sort -nr | cut -d\ -f2-
With this command I know if there are files inside the folders ... then the folder and file will return in the terminal, if it has no files it will not return anything.
How do I know what the return was? Example:
Se tem arquivo(s), print "Achou", senão print "Não achou"
.