terminal cp command

What am I doing wrong here? The file is obviously there since it shows up with the ls -l but then I do the cp and it says it is not there.


Here are my commands:


Franks-MBP:views admin$ pwd

/Users/admin/bitbucket/source/application/views


Franks-MBP:views admin$ ls -l /bitbucket/sourcecode/ci/application/views/info.php info.php

-rw-r--r-- 1 admin staff 102058 Apr 6 12:02 info.php


Franks-MBP:views admin$ ls -l info.php

-rw-r--r-- 1 admin staff 102058 Apr 6 12:02 info.php


Franks-MBP:views admin$ cp /bitbucket/sourcecode/ci/application/views/info.php info.php

cp: /bitbucket/sourcecode/ci/application/views/info.php: No such file or directory


Franks-MBP:views admin$

Windows PC-OTHER, Other OS

Posted on Apr 8, 2017 3:48 PM

Reply
7 replies

Apr 9, 2017 9:38 AM in response to cupboy

If you filesystem is broken. There could be a directory entry for /bitbucket/sourcecode/ci/application/views/info.php, but the actual file contents are not there. This is a totally wild guess.

Is this by any chance a file that is on network storage? I'm making another wild guesses here.

If not network storage, then you might boot into the Recovery Partition and run Disk Utility verify (or repair) and see if it turns anything up.

Apr 9, 2017 10:25 AM in response to cupboy

When you 'ls' you are listing 2 files (Note the space after the first info.php file).

ls -l /bitbucket/sourcecode/ci/application/views/info.php info.php

-> you only see one line of output


I suspect the output is referring to the current directory e.g.

ls ./info.php

and not

ls /bitbucket/sourcecode/ci/application/views/info.php

Run the ls command as on the above line to confirm the file exists without the second file argument.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

terminal cp command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.