This is a test version of Biostars. For the public version, visit https://www.biostars.org.
creating a txt file with absolute path to each directory

I have 3200 files in a directory. I want to generate a single .txt file containing file name one column and absolute path to each file in another column (with tab delimited). For example,

sample1   /home/myself/samples/sample1.db
sample2   /home/myself/samples/sample2.db
sample3   /home/myself/samples/sample3.db

and so on until.... 3200nd file

Any idea please?

shell linux script

1 answer

find /path/to/root -type f -name "*.db" > out.list

Log in to answer this question.