E
E
Edward2014-01-22 16:33:20
linux
Edward, 2014-01-22 16:33:20

How to find all directories in Linux that are listed in a text file and remove them recursively in the list?

Good day!
Linux system, centos.
Problem : there is a list of directories in a text file (the list is separated by a normal carriage return "\n", directory names are indicated by numbers (eg 580067)).
There are also a huge number of subfolders whose folder names are numbers (the names are in the list)
An example of the folder structure:

/var/my_store_dir/579/580067/{some files}
/var/my_store_dir/579/580395/{some files}
/var/my_store_dir/631/632895/{some files}

Bottom line : you need to find all the directories that are listed in the text file and delete them recursively.
Is this even possible?
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question