I needed relative pathes to all files in some "root" folder and came up with that solution with the help of previous answers here
realpath --relative-to=$PATH_TO_DIR "$(find $PATH_TO_DIR -type f)"
One also can cd
into directory $PATH_TO_DIR
is pointing to, and change $PATH_TO_DIR
to .
*This solution works for unix-based systems, where realpath
utility is present