ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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):
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):
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?
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?
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.
What was your fix for the minor issue? And how did you send the file/files over? From your local computer, sending the scp command over?
The issue has been solved for some files in /log i.e. text files. But I get the same error when I try to retrieve other files which have no extension (like: I have a file called df.last with no extension displayed).
I tried to get the file type using the following command
Code:
file /log/df.last
It says:
Code:
/log/df.last: ASCII text
So now the problem lies in getting the extension for this file. So finally my problem is partially solved. Sorry for marking the thread as [SOLVED].
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).
The same command would work for any other file, despite the absence of extensions. What is the error message in this case?
No, it is not working for one file by name df.last. Error msg is
Code:
/log/df.last: No such file or directory
Quote:
Originally Posted by colucix
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).
The file name itself is df.last. I don't know the extension. last is not an extension. It is a part of the filename.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.