I am trying to interactively remove files listed with their paths in a text file.
The command I am trying is: xargs rm -i <filelist.txt
xargs rm -i <filelist.txt
The error I get is:
rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory.
rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory.
I suspect the \r\r that has been added to the end of the filename is an indication of what is wrong, but I have no idea what it might mean.
I also tried: xargs -rd '\n' --arg-file=filelist.txt rm -i --
xargs -rd '\n' --arg-file=filelist.txt rm -i --
with the exact same result.
Files are listed in filelist.txtfilelist.txt in the format: directory1/directory2/filename.extension
where directory1directory1/directory2/filename.extension
where directory1 is in the current directory.