LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-05-2015, 07:51 AM   #1
Ventusman
LQ Newbie
 
Registered: Oct 2015
Location: Dorset
Posts: 2

Rep: Reputation: Disabled
Question cp: cannot stat . What does it mean?


I am attempting to teach myself programming in Linux from a starting point of being an absolute beginner. I chose the project on the BBC’s Click program to make a Raspberry Pi powered VPN thinking it would be a good starting point. However, fairly early on I have become stuck. Everything has worked properly according to the instructions until the section Generating Keys. I am using the Putty program to enter commands and am quite sure that the command line required is entered accurately.
On entering the command line
cp –r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/easy-rsa
I get the response
cp: cannot stat ‘/usr/share/doc/openvpn/examples/easy-rsa/2.0’: No such file or directory
At this point I become stuck and although I have read through all the forum inputs on this subject I cannot find a solution to the problem so would appreciate some help in getting over this hurdle – in simple terms please!
 
Old 11-05-2015, 08:06 AM   #2
urbanwks
Member
 
Registered: Sep 2003
Distribution: Slackware64-Current, FreeBSD 12.1, Alpine 5.4, Manjaro 19, Alpine on WSL [Win10]
Posts: 194

Rep: Reputation: 213Reputation: 213Reputation: 213
I think the answer lies here:

Code:
No such file or directory
Are you sure that the directory you're trying to copy exists? Or that the destination exists?

Last edited by urbanwks; 11-05-2015 at 08:08 AM.
 
Old 11-05-2015, 08:08 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
The format for the cp command, which you have followed, is "source" followed by "target", however the system you are on feels that the "source" file or directory is not there.

Firstly, do you understand the -r directive? That means to recurse into a directory, therefore it would expect that "source" you typed to be a directory.

Secondly, do you know how to use the "ls" command? That shows the contents of a directory. Therefore you can do things like:
Code:
ls -l /use/share/doc/openvpn/examples/easy-rsa
to see what is in the one level higher directory and see if "2.0" is a file, directory, or if it's non-existent.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO harig Programming 1 03-28-2013 06:34 AM
[SOLVED] gcc linker error - hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) chaosless Linux - Software 1 09-17-2009 12:33 PM
cannot stat scottsteibel Linux - Newbie 2 12-11-2004 03:51 PM
stat warney_out Programming 1 09-28-2004 03:37 AM
Linux stat to Windows Stat sridurai Programming 3 09-24-2004 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration