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 :)
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 connect to the Linux command prompt using JAVA code?
Q. Hmm... not sure if u understand wat i mean....
What i want to know is the codes in JAVA to run the things in Linux command prompt... Like when i run the java prog, i want to be able to connect to the command prompt ... (hope u understand... :P)
Thanks a lot... =)
PS: Any useful links will be really appreciated =)
What i want to know is the codes in JAVA to run the things in Linux command prompt... Like when i run the java prog, i want to be able to connect to the command prompt ... (hope u understand... :P)
Thanks a lot... =)
PS: Any useful links will be really appreciated =)
A. I think I know what your trying to say. You want to run a linux command from the the Java Runtime Environment. This command should work.
Runtime.getRuntime().exec(String command);
There is more info at this link http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=34&t=003535.
Runtime.getRuntime().exec(String command);
There is more info at this link http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=34&t=003535.
What is the linux command to obtain the PID number of a specific program running?
Q. I'm tired to use the "top" and search around for the PID of a program that I know is running on a remote terminal, left open by someone else, and that I want to kill. I wonder if there is a linux command that would return the PID of only that program.
A. ps aux | grep processname
or
pidof processname
or
pidof processname
Nec Projector Review
Plastic Shed Reviews
Ati Graphic Reviews
Nurse Uniforms Reviews
Cabochons Reviews
Inflatable Water Slides Reviews
Barcode Scanner Reviews
No comments:
Post a Comment