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

Wednesday, May 1, 2013

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

Where do I find source code of linux commands?
Q. Linux commands like cp, dir, ls, shred, man (etc...) are nothing but programs (hopefully all written in C). I would really like to know exactly how they work (and make a few modifications to some) so I need their source code...
Can you tell me where to find source code of linux commands?
Thank you in advance!

A. In general there are several places you can go to get the source for these commands. This is mostly because there can be several different implementations of the commands.

1) The company who distributed your version of Linux. Most versions of these types of commands are under the GPL and as such the person or company who gave you the executable has to make a copy of the source code available to you. Usually these are released as source rpms, and some times come on one of the CDs or DVDs that you used to install Linux with. You can often find them on the web too.

For example the RHEL5 Server source rpm (SRPM) is
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/coreutils-5.97-12.1.el5.src.rpm

Most of the time your distribution will have a tool like yum to install these and other rpms for you.

2) www.gnu.org
GNU probably wrote the commands that are on your distribution of Linux, although a few very specialized distros use different implementations of the commands (Usually busybox http://www.busybox.net/ but this is really rare).

http://www.gnu.org/software/coreutils/
has instructions on how to download a very recent copy of the code, which may be much much newer then the version currently installed on your computer.

NOTE:

Some shells, like tcsh and csh have their own implementations of these commands built into them. This is because it is faster to run the command as part of your shell then to fork and exec a new command. So if you do change them be sure to check that you are actually running your updated version. BASH usually does not play these games but you can always check by running which followed by the name of your command.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

Monday, April 8, 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, March 20, 2013

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

Saturday, March 2, 2013

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

Thursday, February 28, 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

Wednesday, February 20, 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

Tuesday, February 19, 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

Thursday, February 14, 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

Sunday, February 10, 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

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

Monday, February 4, 2013

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

Saturday, February 2, 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 1, 2013

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

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

Tuesday, January 29, 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

Saturday, January 26, 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

Thursday, January 24, 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

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

Monday, January 21, 2013

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

Where do I find source code of linux commands?
Q. Linux commands like cp, dir, ls, shred, man (etc...) are nothing but programs (hopefully all written in C). I would really like to know exactly how they work (and make a few modifications to some) so I need their source code...
Can you tell me where to find source code of linux commands?
Thank you in advance!

A. In general there are several places you can go to get the source for these commands. This is mostly because there can be several different implementations of the commands.

1) The company who distributed your version of Linux. Most versions of these types of commands are under the GPL and as such the person or company who gave you the executable has to make a copy of the source code available to you. Usually these are released as source rpms, and some times come on one of the CDs or DVDs that you used to install Linux with. You can often find them on the web too.

For example the RHEL5 Server source rpm (SRPM) is
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/coreutils-5.97-12.1.el5.src.rpm

Most of the time your distribution will have a tool like yum to install these and other rpms for you.

2) www.gnu.org
GNU probably wrote the commands that are on your distribution of Linux, although a few very specialized distros use different implementations of the commands (Usually busybox http://www.busybox.net/ but this is really rare).

http://www.gnu.org/software/coreutils/
has instructions on how to download a very recent copy of the code, which may be much much newer then the version currently installed on your computer.

NOTE:

Some shells, like tcsh and csh have their own implementations of these commands built into them. This is because it is faster to run the command as part of your shell then to fork and exec a new command. So if you do change them be sure to check that you are actually running your updated version. BASH usually does not play these games but you can always check by running which followed by the name of your command.



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

Older Posts Home