I'm using command find
to recursively browse through directory tree, counting files, sizes, etc...
Now I need to get directory depth of each file. Is there any portable way for both FreeBSD and CentOS?
I know that find
is able to prinf actual directory depth but sadly this works only on CentOS, not FreeBSD.
Additionaly - I need to keep standard find
output OR put directory depth on the beginning of output and cut it from there.