I need to delete files and directories by using a source file. I can not use the rm –r command to remove the files and directories. The file that I have is in reverse order. How can I use this file to delete all the files and directories?
Example input file.
/export/home/user1/test6
/export/home/user1/test5/test_file 2.doc
/export/home/ user1/test5/testfile
/export/home/ user1/test5
/export/home/ user1/test4/testfile2
/export/home/ user1/test4/testfile
/export/home/ user1/test4
/export/home/ user1/test3/test file 2.doc
/export/home/ user1/test3/testfile
/export/home/ user1/test3
/export/home/ user1/test2/test file 2
/export/home/ user1/test2/testfile
/export/home/ user1/test2
/export/home/ user1/test1/test file 2
/export/home/ user1/test1/testfile
/export/home/ user1/test1/test2/test file 2
/export/home/ user1/test1/test2/testfile
/export/home/ user1/test1/test2/test3/test file 2
/export/home/ user1/test1/test2/test3/testfile
/export/home/ user1/test1/test2/test3
/export/home/ user1/test1/test2
/export/home/ user1/test1
Example input file.
/export/home/user1/test6
/export/home/user1/test5/test_file 2.doc
/export/home/ user1/test5/testfile
/export/home/ user1/test5
/export/home/ user1/test4/testfile2
/export/home/ user1/test4/testfile
/export/home/ user1/test4
/export/home/ user1/test3/test file 2.doc
/export/home/ user1/test3/testfile
/export/home/ user1/test3
/export/home/ user1/test2/test file 2
/export/home/ user1/test2/testfile
/export/home/ user1/test2
/export/home/ user1/test1/test file 2
/export/home/ user1/test1/testfile
/export/home/ user1/test1/test2/test file 2
/export/home/ user1/test1/test2/testfile
/export/home/ user1/test1/test2/test3/test file 2
/export/home/ user1/test1/test2/test3/testfile
/export/home/ user1/test1/test2/test3
/export/home/ user1/test1/test2
/export/home/ user1/test1