I'd like to use
find to list all files and directories recursively in a given root for a
cpio operation. However, I don't want the root directory itself to appear in the paths. For example, I currently get:
$ find diskimg
But, I'd like to get
(note the root is also not in my desired output, but that's easy to get rid of with
I'm on OS X, and I'd prefer not to install any extra tools (e.g. GNU find) if possible, since I'd like to share the script I'm writing with other OS X users.
I'm aware this can be done with
cut to cut the root listing off, but that seems like a suboptimal solution. Is there a better solution available?