I have a folder filled with 100 log files, some of them have data, some dont. I have a script that picks out the files with the data and have the names saved in a text file named "goodfiles.txt" I would like to know how i can read the files in the text file and move them to another folder. I have tried this:
cat /root/testing2/goodfiles.txt | xargs mv -f /root/testing2/moved/
but it gives me an error saying
mv: Target (log1508.log) must be a directory in order to move
mv: directories or multiple files to it.
can someone please help me?