remove the ./ from find -print

Posted on Wed 28 September 2022 in tech • Tagged with linux, programming, bash

If you want to apply a script to each file in a folder recursively you may not want the full relative path. Here is how to remove it.

$ find . -type f -print | sed -e "s|^\./||g"

For example to combine it with xargs and invoke a script on each name …


Continue reading