Thanks to @BenSincla, this article become very simple!
For example, you have directory like this.
$ tree A
A
├── B
│ └── b.txt
├── C
│ └── c.txt
└── a.txt
2 directories, 3 files
Relative path
find ./A -type f
Absolute path
find ./A -type f | \
while read file; do
echo $file | sed -e "s|^.|$PWD|g"
done
Top comments (4)
This seems like a long-winded way of doing
find -type f A
?When searching for a particluar extension, I use (in zsh)
Just replace by what you need.
You are right!.
I rewrite the article. Thank you!
I mean it's a nice little explanation of how to string together commands to do something new :)