I think the newer versions of find have a "-rm" option. This will work instead of the exec command. Might work even with spaces. Or you might need to use the parameter that separates file names with \0 instead of spaces. Rob Dec. 28, 2020 19:40:22 James <bjlockie [ at ] lockie [ dot ] ca>: > I want to find all the empty .txt files under the current directories. > I eventually want to delete them. :-) > There are spaces in the directory names. > > I tried: > find . -name \*.txt -empty -exec "ls -l '{}'" \; > but it gives "No such file or directory" errors (which I am guessing is from the ls -l. > > To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org > To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org > To visit the archives: https://lists.linux-ottawa.org > To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org To visit the archives: https://lists.linux-ottawa.org