Showing posts with label linux find command. Show all posts
Showing posts with label linux find command. Show all posts

Tuesday, May 14, 2013

explanation of sourcing in linux?

Q. eg . .bashrc
after invoking the above, my PATH was updated in every new shell i opened. why?
no i wish to know about sourcing..
as in . filename
what does it do?

A. "When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc."

That's what it's supposed to do. It all depends what you have in .bashrc.

...

how to attach c++ aplication to the website?
Q. i have aplication, which i made in c++ and now want to atach to web site which ill make in php. can any1 help and give tips how to make it?

A. Well, assuming it's a command line program, you can just call it as a CGI program. Setting up CGI access is different in Linux/Apache than it is in Windows/IIS.

Need help with a Unix program?
Q. I need help in writing a unix program for a homework assignment. All I have is this:

#!/bin/Bash
echo "Enter the two numbers to be added:"
read n1
read n2
answer=$(($n1+$n2))
echo $answer

I tried it out and it didn't work as planned. Can I get a little help as to what I'm doing wrong?
The actual assignment is below:

Write a bash program to implement an interactive adding machine. The program
should input 2 or more integers from Standard Input (keyboard) and output the
sum of those integers to Standard Output (display). It is not necessary to
check for invalid (non-integer) inputs. The program should terminate due to
user input.


Be sure your program includes all of the following:comments with your name, the date, and the assignment
comments or output with instructions for using the program
prompts for all inputs
labels for all outputs
descriptive names and/or comments explaining variables & functions
indentation of code blocks
comments explaining any non-obvious control flow

A. If you're going to be working in IT the very first thing you need to learn is how to explain a problem accurately and completely.

- What happened (or didn't happen) for you to say, "it didn't work as planned"?
- How did you try it out? (*Exactly* what commands did you type? What, if anything, did the system say in response to those commands?)

Now, from a superficial review of the code, the first problem is on the first line. You should have received an error such as this:
$ /tmp/homework
bash: /tmp/homework: /bin/Bash: bad interpreter: No such file or directory
$

This is a hint that the system cannot find "/bin/Bash", and indeed if you review that carefully you'll find that you should have typed "/bin/bash". Unix (and Linux-based) systems are case-sensitive.

Other than that, the problem fundamentally does what you need. You'll have to add all the fancy bits, though, such as comments.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Monday, May 13, 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.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Wednesday, May 1, 2013

What does it mean for windows users if basic knowledge of linux commands are required?

Q. For example FTP and Telnet both run Linux. So that would indicate that some basic konwledge of Linux commands is necessary. However, I am a Windows user...

A. FTP can run on Linux, but it doesn't always run on Linux.

You can run an FTP server on Windows and an FTP client on Windows. Same for Mac.

It is just a File Transfer Protocol. The protocol is cross-platform, not Linux-specific.

Is there a way to reset the stats for the Linux command df?
Q. For a while now whenever I use the command df in Linux it shows that one of my partitions is full but if I use the du -ac command it shows that I am using only 4.2 of 7.8 Gigs of storage. Is there a way to reset the stats for the Linux command df?

A. Df and du do not measure the same exact things. You can google for: df VS du and see a lot of explanations.

Please suggest me a software that i can install in windows XP inorder to learn LINUX commands?
Q. I want to learn linux commands on windows platform (without the requirement of linux OS). I had a software but i forgot the name, can please help getting that similar kind of functionality.

Thank you all for your kind suggestions and Hints.

A. If you want native solution, then Cygwin is the best. It allows you to configure and install only those applications that you want.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Wednesday, April 10, 2013

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 =)

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.

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

How to enter password by linux command?
Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Sunday, April 7, 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.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Friday, April 5, 2013

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

How to enter password by linux command?
Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.

What does it mean for windows users if basic knowledge of linux commands are required?
Q. For example FTP and Telnet both run Linux. So that would indicate that some basic konwledge of Linux commands is necessary. However, I am a Windows user...

A. FTP can run on Linux, but it doesn't always run on Linux.

You can run an FTP server on Windows and an FTP client on Windows. Same for Mac.

It is just a File Transfer Protocol. The protocol is cross-platform, not Linux-specific.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Saturday, March 23, 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.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

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.

How do I edit a text using linux command line mode?
Q. I need to edit a text file but I dont know how do you do it using linux in command line mode.

Thanks!

A. pico or nano are good choices for a novice. emacs or vi for an expert



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Tuesday, February 12, 2013

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 =)

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.

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

How to enter password by linux command?
Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

How to enter password by linux command?

Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.

What does it mean for windows users if basic knowledge of linux commands are required?
Q. For example FTP and Telnet both run Linux. So that would indicate that some basic konwledge of Linux commands is necessary. However, I am a Windows user...

A. FTP can run on Linux, but it doesn't always run on Linux.

You can run an FTP server on Windows and an FTP client on Windows. Same for Mac.

It is just a File Transfer Protocol. The protocol is cross-platform, not Linux-specific.

Is there a way to reset the stats for the Linux command df?
Q. For a while now whenever I use the command df in Linux it shows that one of my partitions is full but if I use the du -ac command it shows that I am using only 4.2 of 7.8 Gigs of storage. Is there a way to reset the stats for the Linux command df?

A. Df and du do not measure the same exact things. You can google for: df VS du and see a lot of explanations.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Is there a way to reset the stats for the Linux command df?

Q. For a while now whenever I use the command df in Linux it shows that one of my partitions is full but if I use the du -ac command it shows that I am using only 4.2 of 7.8 Gigs of storage. Is there a way to reset the stats for the Linux command df?

A. Df and du do not measure the same exact things. You can google for: df VS du and see a lot of explanations.

Please suggest me a software that i can install in windows XP inorder to learn LINUX commands?
Q. I want to learn linux commands on windows platform (without the requirement of linux OS). I had a software but i forgot the name, can please help getting that similar kind of functionality.

Thank you all for your kind suggestions and Hints.

A. If you want native solution, then Cygwin is the best. It allows you to configure and install only those applications that you want.

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 :)



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Saturday, February 9, 2013

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 =)

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.

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

How to enter password by linux command?
Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Friday, February 8, 2013

Please suggest me a software that i can install in windows XP inorder to learn LINUX commands?

Q. I want to learn linux commands on windows platform (without the requirement of linux OS). I had a software but i forgot the name, can please help getting that similar kind of functionality.

Thank you all for your kind suggestions and Hints.

A. If you want native solution, then Cygwin is the best. It allows you to configure and install only those applications that you want.

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)



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Tuesday, February 5, 2013

Please suggest me a software that i can install in windows XP inorder to learn LINUX commands?

Q. I want to learn linux commands on windows platform (without the requirement of linux OS). I had a software but i forgot the name, can please help getting that similar kind of functionality.

Thank you all for your kind suggestions and Hints.

A. If you want native solution, then Cygwin is the best. It allows you to configure and install only those applications that you want.

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)



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Is there a way to reset the stats for the Linux command df?

Q. For a while now whenever I use the command df in Linux it shows that one of my partitions is full but if I use the du -ac command it shows that I am using only 4.2 of 7.8 Gigs of storage. Is there a way to reset the stats for the Linux command df?

A. Df and du do not measure the same exact things. You can google for: df VS du and see a lot of explanations.

Please suggest me a software that i can install in windows XP inorder to learn LINUX commands?
Q. I want to learn linux commands on windows platform (without the requirement of linux OS). I had a software but i forgot the name, can please help getting that similar kind of functionality.

Thank you all for your kind suggestions and Hints.

A. If you want native solution, then Cygwin is the best. It allows you to configure and install only those applications that you want.

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 :)



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Monday, February 4, 2013

Is there a way to reset the stats for the Linux command df?

Q. For a while now whenever I use the command df in Linux it shows that one of my partitions is full but if I use the du -ac command it shows that I am using only 4.2 of 7.8 Gigs of storage. Is there a way to reset the stats for the Linux command df?

A. Df and du do not measure the same exact things. You can google for: df VS du and see a lot of explanations.

Please suggest me a software that i can install in windows XP inorder to learn LINUX commands?
Q. I want to learn linux commands on windows platform (without the requirement of linux OS). I had a software but i forgot the name, can please help getting that similar kind of functionality.

Thank you all for your kind suggestions and Hints.

A. If you want native solution, then Cygwin is the best. It allows you to configure and install only those applications that you want.

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 :)



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Saturday, February 2, 2013

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

How to enter password by linux command?
Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.

What does it mean for windows users if basic knowledge of linux commands are required?
Q. For example FTP and Telnet both run Linux. So that would indicate that some basic konwledge of Linux commands is necessary. However, I am a Windows user...

A. FTP can run on Linux, but it doesn't always run on Linux.

You can run an FTP server on Windows and an FTP client on Windows. Same for Mac.

It is just a File Transfer Protocol. The protocol is cross-platform, not Linux-specific.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Please suggest me a software that i can install in windows XP inorder to learn LINUX commands?

Q. I want to learn linux commands on windows platform (without the requirement of linux OS). I had a software but i forgot the name, can please help getting that similar kind of functionality.

Thank you all for your kind suggestions and Hints.

A. If you want native solution, then Cygwin is the best. It allows you to configure and install only those applications that you want.

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)



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Friday, January 25, 2013

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 =)

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.

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

How to enter password by linux command?
Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

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

How to enter password by linux command?
Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.

What does it mean for windows users if basic knowledge of linux commands are required?
Q. For example FTP and Telnet both run Linux. So that would indicate that some basic konwledge of Linux commands is necessary. However, I am a Windows user...

A. FTP can run on Linux, but it doesn't always run on Linux.

You can run an FTP server on Windows and an FTP client on Windows. Same for Mac.

It is just a File Transfer Protocol. The protocol is cross-platform, not Linux-specific.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Older Posts Home