Thursday, January 10, 2013

How to save file to desktop using Linux commands.?

Q. I am a beginner to Linux commands. I use SSH to connect to a Linux server. What command can I use to save a text file on the server to my desktop? Example?

A. From your desktop, fire up a terminal, or use Cygwin if you're under Windows (make sure you have installed the openssh packages) :

scp <your_user_name>@<server_name>:<path to remote file> <path to local dir/file>

Enter your password, and you're done :)

How do I add an FTP user with a Linux command?
Q. I need to write a PHP script that automatically adds FTP users. I can use the system() function to run a Linux command, but I don't know how to create a new FTP user. Any help here?
I don't own the server, I've purchased a reseller plan.

A. When you say add an ftp user, I assume that you wouldn't want the person to be able to log in to a shell on the system. FTP users are just like any other linux user. Use the adduser(sometimes called useradd) command and pay attention to the --shell switch (set to /bin/false)

how to open a url from linux command line?
Q. I want to run a url from the linux command lline. So, please help me with the command.

A. You could use lynx or links. Both are text-based browsers.

Alternatively, you could use wget which will retrieve the url you pass to it.




Powered by Yahoo! Answers

No comments:

Post a Comment