Skip to main content
added 18 characters in body; edited tags
Source Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

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.

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

The error I get is:

rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory.

I suspect the \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 --

with the exact same result.

Files are listed in filelist.txt in the format: directory1/directory2/filename.extension

where directory1 is in the current directory.

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

The error I get is:

rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory.  

I suspect the \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 --

with the exact same result.

Files are listed in filelist.txt in the format: directory1/directory2/filename.extension where directory1 is in the current directory.

deleted 1 character in body
Source Link
Mike
  • 65
  • 1
  • 9

I am trying to interactively remove files listed with their paths in a text file.

The command I am trying is: xargs rm -r <i filelist<filelist.txt

The error I get is:

rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory.

I suspect the \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 --

with the exact same result.

Files are listed in filelist.txt in the format: directory1/directory2/filename.extension

where directory1 is in the current directory.

I am trying to interactively remove files listed with their paths in a text file.

The command I am trying is: xargs rm -r < filelist.txt

The error I get is:

rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory.

I suspect the \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 --

with the exact same result.

Files are listed in filelist.txt in the format: directory1/directory2/filename.extension

where directory1 is in the current directory.

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

The error I get is:

rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory.

I suspect the \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 --

with the exact same result.

Files are listed in filelist.txt in the format: directory1/directory2/filename.extension

where directory1 is in the current directory.

formatting
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 265

I am trying to interactively remove files listed with their paths in a text file.

The command I am trying is: xargs rm -r filelist.txt (there is a "<" before the filelist.txt argument, but the Q/A system here is not accepting it)xargs rm -r < 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. II suspect the \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.txt in the format: directory1directory1/directory2/filename.extension

where directory1 is in the current directory.

I am trying to interactively remove files listed with their paths in a text file.

The command I am trying is: xargs rm -r filelist.txt (there is a "<" before the filelist.txt argument, but the Q/A system here is not accepting it)

The error I get is:

rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory. I suspect the \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 --

with the exact same result.

Files are listed in filelist.txt in the format: directory1/directory2/filename.extension

where directory1 is in the current directory.

I am trying to interactively remove files listed with their paths in a text file.

The command I am trying is: xargs rm -r < filelist.txt

The error I get is:

rm cannot remove 'directory1/directory2/filename.extension\r': No such file or directory.

I suspect the \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 --

with the exact same result.

Files are listed in filelist.txt in the format: directory1/directory2/filename.extension

where directory1 is in the current directory.

Source Link
Mike
  • 65
  • 1
  • 9
Loading