scp on the file stored in /
I am logged into a remote system as shik28. I have to retrieve a file which is located in the directory /log from the remote system to the local system.
when I write execute the following command, Code:
scp shik28@somedomain.com:/log/source.txt destination.txt Code:
/log/source.txt: No such file or directory |
Hi,
You mention being logged into the remote server and want to scp a file to your local server. If that is true, the command is wrong (it scp's from remote to local): Code:
scp /log/source.txt user@localserver.com:/path/to/destination.txt Hope this helps. |
Quote:
|
Nope. Usually a user hasn't got permission to access log files, but the error in that case would be "Permission denied". Check the path of the file: might it be in /var/log/ instead?
|
Quote:
|
Hi,
As already mentioned by colucix: You do need the proper permissions, on both sides. But the error shown points to a source that doesn't exist. Hope this helps. |
Hi,
What is the output of the following command: On the local and the remote server: ls -l /log/source.txt (and please specify which is which). |
After reading through this thread, it seems the OP maybe confused now - As stated in the first post, he was logged into the remote system, trying to scp a file over to his local system. I think you want to not be logged in, and just use scp from the local computer, using the command posted in the first post, to remotely retrieve the file to avoid confusion.
|
@corp769: As stated in post #2 :)
|
Quote:
|
Command works fine now. Thanks for all your replies. :)
|
Quote:
|
Quote:
I tried to get the file type using the following command Code:
file /log/df.last Code:
/log/df.last: ASCII text |
It's not really clear how did you solve the previous problem: please, can you post the command you used to copy the file /log/source.txt? The same command would work for any other file, despite the absence of extensions. What is the error message in this case?
Furthermore, it's not clear what is your concept of file extension, since df.last has the "last" extension (even if this concept in linux is quite arbitrary). |
Quote:
Code:
scp shik28@domain1.com:/log/source.txt destination.txt Quote:
Code:
/log/df.last: No such file or directory Quote:
|
All times are GMT -5. The time now is 02:30 AM. |