Professional Documents
Culture Documents
Linux Commands 1
Linux Commands 1
Then comes to know where u r in I mean in which folder(hey never call any thing a
folder in Linux every thing is a directory) u r working on, for this the command is
pwd (this is argument less) ..
Then comes normal commands.to know who u r and to know path of any tool etc by
commands
who--- this is argument less
whichfor this u hve to type the argument for which path is to be displayed
absolute path is the path specifying entire path including home directory also.
For example consider this command shown below
Relative path specifies the path for the respective folder without any named things.
For example consider below command
If any help required for any command then just type commandhelp then it will
display u information about command
ls --- it displays the list of the files and directories in ur present directory
as I said every command has options I mean just like constrains the options for this
command are
options are :
-P ----- to create intercening parent directories even if they donot exist
rm -f <file name> --- this command does not promt before removing
rm i <file name> -- prompt before removing
rm r <directory name> -- this command removes directories recursively.(*it
prompts for each directory before removed)
COPYING FILES:
options are
-f --- does not prompt before copying
-i ---- prompts before copying
-r ---- copies directories recursively
RENAMING AND MOVING FILES:
options are:
-f same as for copy
-i --- same as for copy
Remember tghat ..ther is no command for renaming a filewe have to use mv command
for that also
TAB COMPLETION :
U can type any one file name not even completely and then type tab u can see..possible
files for that u typed
options
u for user
g for group
o other
a all
examples for this type are chmod +RWX <filename> gives all permission to that file for
user
4 is for READ
2 is for WRITE
1 is for EXCUTE
give it in order for example if u give chmod 755 it represnts the total permnissions for
user and only read and execute permission for group and others
7 --- READ (4) + WRITE(2) + EXECUTE(1)
5 READ(4) + EXECUTE(1)