Jump to: navigation, search

Command line

21 bytes removed, 23:02, 14 February 2009
no edit summary
This (especially the dollar sign) is called the so called "prompt", where ''username'' should be the name of the currently logged on user and ''computername'' is the name of your computer.
Note the "~" (tilde) sign before the prompt. On Linux systems that sign indicates, that your you're in your home directory, which normally should be equal to "/home/username".
On Linux systems, you can chance directories equally to the above described Windows method:
username@computername:~$ cd /any/path/you/like
username@computername:/any/path/you/likehomelike$ cd /home/username
username@computername:~$ cd /some/other/path
username@computername:/some/other/path$ cd ~
Okay. Imagine, you just want to know about the files and directories containing the sequence "run". In order to achieve this, you can pass the output of the "ls" command to another program. A very common filter program is "grep". You use "grep" by telling the program what to filter. Directing the output of "ls" to "grep" (filtering for "run") is done by using the ''pipe'' symbol: "|"
username@computername:~/flightgear$ ls | grep run
drwxr-xr-x 3 username usergroupname 4096 2009-01-26 07:20 simgear
FirtsFirst, every item has its mode bit, shown on the very left in a scheme of "''drwxrwxrwx"'', followed by a number, the username of the owner (should be the same as of the current user!), the name of the group of the current userowner, the file size, its last change date and its name. If there is a "-", the specifiy specific mode bit isn't set.
The first "''d" '' in some of the items indicates a directory. Then, three groups of "''rwx" '' follow. Each "''r" '' means "file/directory may be read", each "''w" '' means "file/directory may be written", each "''x" '' means "file may be executed".  The first group of "''rwx" '' shows the rights of the owner of the file, the next group of "rwx" shows the rights of the group of the owner and the last group of "rwx" gives information about what everybody may do with the file.
As there are some scripts out there, that can be downloaded, you have to make them executable in most of the cases (because downloading only sets "-rw-r--r--" per default). Making a file executable can be achieved by the "chmod" command. We use the "ls" command with its "-l" option and the ''pipe'' to filter the output of "ls" by "grep":
==External links==
* [ Ubuntu wiki page on the command line]
Windows Vista?

Navigation menu