Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-22-2016, 02:21 AM   #1
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


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.


Old 05-22-2016, 11:01 AM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,714

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

Rep: Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900
Show us the output of 'ls' in the same directory
Old 05-22-2016, 02:49 PM   #4
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:

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:

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


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:39 PM.

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