4

Orienting myself with basic terminal commands (Ubuntu 16.04); I have a file listed in my Downloads folder; a Jupyter notebook file called, 'Indexing and Slicing.ipynb' and wish to copy the file to my user directory, 'uswang'. After navigating to the Downloads folder, I tried the command;

cp Indexing and Slicing.ipynb /home/uswang (To be 100% certain I even copy/paste the full file name) but receive the error, 
cp: cannot stat 'Indexing': No such file or directory
cp: cannot stat 'and':No such file or directory
cp: cannot stat 'Slicing': No such file or directory

I get the same error when trying the mv command.

Why would this be the case? Tried researching other cp cannot stat entries, but none seem to relate directly to my predicament - Thanks

muru
  • 197,895
  • 55
  • 485
  • 740
NoVice
  • 43

1 Answers1

2

That is because the file name has spaces in it. You should either use escape character \ or use single quotes. That is either:

cp Indexing\ and\ Slicing.ipynb /home/uswang

or

cp 'Indexing and Slicing.ipynb' /home/uswang
Arun
  • 2,001
  • 11
  • 24
  • Thank you. I did wonder, because the error came back 3 times if it might have something to do with the spaces, but thought I would check in with the community – NoVice Sep 30 '18 at 06:30