bash question: Copy Files to New Directory Using List of File Order
0
0
Entering edit mode
6 weeks ago
Simone • 0

This kinda hard to explain in a post, but I have a txt file with a list of file orders directory (over 5000 files), and i need to copy certain files that match the order to new directory. so, for example, i need the 45th, 323rd, 2356th, etc file in a directory copied to a different directory using a column with the file orders like:

2

45

773

4579

One txt file has 900 file "positions/orders" and the other has 754 file "positions/orders". I was thinking maybe first finding a way to rename all of the files in the directory with their position like "filename_1.txt" would help?

For context, the directory is ~5200 gene tree files, and I'm trying to pull out the discordant ones to analyze them from an output file that lists which ones are concordant/discordant but makes the tree IDs in order of how they're read into the program rather than using their original labels.

loops bash cli linux command_line • 72 views
ADD COMMENT

Login before adding your answer.

Traffic: 1279 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6