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 <[email protected]>:

> 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 [email protected]
> To get help send a blank message to [email protected]
> To visit the archives: https://lists.linux-ottawa.org
> 

To unsubscribe send a blank message to [email protected]
To get help send a blank message to [email protected]
To visit the archives: https://lists.linux-ottawa.org

Reply via email to