LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 05-22-2016, 02:21 AM   #1
gingerlinuxlover
LQ Newbie
 
Registered: May 2016
Posts: 1

Rep: Reputation: Disabled
Cool Learning Bash: What's "cp: cannot stat" and why can't I copy a file


Greetings,

I use a Mac command line at work and at home I change clothes into my Linux Mint 17.3 world.

I AM fairly new to Linux and so I'm trying to learn command line best practices. I'm simply copying a file from the $HOME directory to my git repository.

1. What is this message?
2. Why am I getting it for a simple copy operation?
3. What can I do to accomplish my goal [copy .file from /home/user/Desktop to my locally- cloned git repo.

Thanks,

gingerlinuxlover



http://oi64.tinypic.com/4qkco7.jpg
 
Old 05-22-2016, 11:01 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
According to the image, the file doesn't exist.
 
Old 05-22-2016, 12:44 PM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,425

Rep: Reputation: 2825Reputation: 2825Reputation: 2825Reputation: 2825Reputation: 2825Reputation: 2825Reputation: 2825Reputation: 2825Reputation: 2825Reputation: 2825Reputation: 2825
Show us the output of 'ls' in the same directory
 
Old 05-22-2016, 02:49 PM   #4
sean.ferguson
LQ Newbie
 
Registered: Feb 2012
Location: Scotland
Distribution: Ubuntu 16.04 / Debian 8 / Arch
Posts: 25

Rep: Reputation: Disabled
You may not have appropriate permissions on the file to copy, the file name isnt typed correctly or the file isnt actually in the location you think it is.

ensure the file is in ~/Desktop with:

Code:
ls -al ~/Desktop
if it is in that folder, take note of the format of the filename. Filenames are case-sensitive. If it is infact in the folder and the filename is correct try ensuring you have correct permissions by doing:

Code:
chmod 775 ~/Desktop/Testing.txt
then try copying again.

If you are unsure about any of the commands used above, check the manpages first e.g. man chmod
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
small bash script copy one file to list of directories on file lahirushanaka Linux - Newbie 10 06-14-2014 12:00 PM
bash script to copy a file from the internet AgentD Programming 3 01-24-2009 12:29 AM
Bash : Copy a file every one minute macabre_sunsets Programming 15 09-16-2006 01:26 AM
smbclient copy problem (cant stat file...) taiwf Linux - Networking 6 08-01-2005 06:27 PM
/usr/bin/stat not present. Can I just copy the file mystique98ls Linux - Newbie 2 01-06-2005 03:02 PM


All times are GMT -5. The time now is 10:56 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration