Friday, April 26, 2024
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 107503  / 3 Years ago, fri, august 27, 2021, 6:58:15

I've faced a problem when copying a file with the commands,



cp ~/Downloads/sample.pdf ~/Desktop/


But the terminal gives me a message, cp: cannot stat 'sample.pdf': No such file or directory.


More From » command-line

 Answers
4

Have you verified that sample.pdf is the exact filename in the downloads folder? It looks like the path is incorrect and that file doesn't actually exist there. Try this...



ll ~/Downloads



See if sample.pdf shows up in the file list.


[#32545] Friday, August 27, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oargrou

Total Points: 336
Total Questions: 105
Total Answers: 113

Location: Vietnam
Member since Sun, Oct 18, 2020
4 Years ago
oargrou questions
Thu, May 13, 21, 16:38, 3 Years ago
Wed, Jul 21, 21, 01:38, 3 Years ago
Sat, May 15, 21, 17:39, 3 Years ago
Tue, May 24, 22, 14:58, 2 Years ago
Sat, Mar 19, 22, 05:22, 2 Years ago
;