Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CD
Change Directory
$ cd /
$ cd ..
PWD
Present Working Directory
$ pwd
HOSTNAME
Yours machine name
$ hostname
CLEAR
Clear the whole screen
$ clear
LS
Show the complete list
-l (long format)
-a (list . files too)
-r (reverse order)
-t (newest appears first)
$ ls l
$ ls -alt
CP
Copies a file from one location to another.
-f(to force the copy to occur)
-r(to recursively copy a directory)
$ cp /tmp/basharat /tmp
MV
Move a file from one location to another. And rename the file.
-f (to force the move to occur)
$mv basharat /tmp/basharat
RM
Remove a file
-f(to force the removal of the file)
-r(to recursively remove a directory)
Remove all *.unl files in /tmp/bash
$rm filename
CAT
Print a file to stdout(screen)
$cat filename
CHMOD
Change the file permissions
$Chmod 666 filename
R=4, w=2, x=1
CHOWN
Change ownership of a file.
MKDIR
Creates a directory
$mkdir /tmp/basharat
RMDIR
Remove a directoy
$rmdir /tmp/basharat
VI
The standard operating system text-file editor.
$vi filename
To add someone in the file (Esc+I)
Remove some one from the file (Esc+x)
Who
List users who are currently logged on (useful with option am I -i.e. who am I or
whoami)
PS
List processes currently running, by default on the current shell. Useful with
options.
-ef (show all processes)
Uname a
Will show you what machine you are currently on.
DATE
Show current date and time.
LAST (username)
Shows a list of recent login of user.
SCP
Securely transferring computer files between a local host and a remote host or
between two remote hosts. It is based on the secure shell protocol.
$ Scp sourcefile user@hostip:directory/targetfile.
$ scp r user@hostip:directory/sourcefolder targetfolder
REBOOT
Reboot the system
$reboot
FIND
Find the files (Search the files)
$Find name (filename)
$find *-name(filename)
$find . name(filename)