Is there a linux command for getting only the files in a folder and inside its subfolders? I have used the find
command, but it is displaying all the files and folders. I am executing this shell command using the php exec()
function.
1 Answer
You should use the -type f option to get only files.
find /path_to_find -type f
-
Thanks xdazz.Is their any way to get the files that are modified after a date like
20-08-2011
– THOmasCommented Aug 22, 2011 at 6:04 -
1@THOmas: read the man page & search, this is very frequently asked (and answered)– MatCommented Aug 22, 2011 at 6:06
-
2@THOmas: man find. You can use -mtime, or you can use touch to create a file with the time 20110820 and use -newer.– xdazzCommented Aug 22, 2011 at 6:14