0
I'm trying to write a bash script that will run on my QNap NAS to touch a directory recursively. I have this:
find $1 -exec touch {} +
However, find that comes with BusyBox 1.01 doesn't support the -exec argument, here are the docs:
BusyBox v1.01 (2011.02.08-16:24+0000) multi-call binary
Usage: find [PATH...] [EXPRESSION]
Search for files in a directory hierarchy. The default PATH is
the current directory; default EXPRESSION is '-print'
EXPRESSION may consist of:
-follow Dereference symbolic links.
-name PATTERN File name (leading directories removed) matches PATTERN.
-print Print (default and assumed).
-type X Filetype matches X (where X is one of: f,d,l,b,c,...)
-perm PERMS Permissions match any of (+NNN); all of (-NNN);
or exactly (NNN)
-mtime TIME Modified time is greater than (+N); less than (-N);
or exactly (N) days
So, is there another approach I could use instead, to achieve the same goal? Thanks.
What shell are you in?/What do you have available? I would hope that one of those would have
for
orread
to take the list from find's -print? – Pricey – 2011-04-24T18:09:13.457