find and print full path file in linux

lets say you have to find all file with extension .csv in some folder, its can be done with find

folder structure

find-command


# find .csv file in folder /home/g3n1k/test

g3n1k@cb:~/tmp$ find /home/g3n1k/test -type f -follow -print | grep .csv
/home/g3n1k/test/140630_NSN/BHCA5.csv
/home/g3n1k/test/140630_NSN/BHCWA4.csv
/home/g3n1k/test/140630_NSN/BHCWA5.csv
/home/g3n1k/test/140630_NSN/CGR4.csv

....

if you want output to file add > yourfile.txt


# find .csv file in folder /home/g3n1k/test
# then output path to file

g3n1k@cb:~/tmp$ find /home/g3n1k/test -type f -follow -print | grep .csv > filecsv.txt

find-output-file

Published by

G3n1k

just to remember what i had known :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s