Sei sulla pagina 1di 4

Viewing,copying, moving and deleting files ls Display the contents of the current directory ls -a Display also hidden files

and hidden directories cp filename /path/dir_name cp -r dir_name /path/dir_name2 cp filename1 filename2 /path/dir_name rm name rm -r name Copy filename into directory /path/dir_name Copy the entire dir_name into /path/dir_name2 Copy filename1 and filename2 into /path/dir_name Remove a file or directory called name Remove an entire directory as well as its included files and su directories

mv filename !ove filename into /path/dir_name /path/dir_name mv filename1 filename2 Rename filename1 to filename2 cat filename more filename head filename head -1& filename tail filename tail -1& filename pwd cd /path/dir_name cd "" m(dir dir_name rmdir dir_name Display filenames contents Display filename in pages" #se space ar to view ne$t page Display filenames first 1% lines Display filenames first 1& lines Display filenames last 1% lines Display filenames last 1& lines Display current directory Change to directory /path/dir_name 'o 1 directory up Create directory dir_name Delete directory dir_name

)inding files and te$t within files #pdate *create first time used+ a data ase of all files updated under the root directory / locate filename )ind file filename searching in the data ase find / -name filename find / -name -filename grep string /path/dir_name which application_name whereis application_name ,tarting from the root directory search for the file called filename ,ame as a ove ut search for file containing the string filename ,tarting from /path/dir_name search for all files containing string ,earch .path for application app_name ,earch .path, man pages and source files for application_name

/rchived files Decompress tar -$0f filename"tg0 tar -$0f filename"tar"g0 tar -$1f filename"tar" 02 Compress tar -c0f filename"tar /path/dir_name g0ip -c filename 2 filename"g0 0ip2 -c filename 2 filename" 02 #sing rpm files rpm -hiv pac(age"rpm rpm -hiv --force pac(age"rpm rpm -h#v pac(age"rpm rpm -e pac(age"rpm rpm -4pil pac(age"rpm

Decompress t0g file Decompress tar"g0 file Decompress tar" 02 file

Compress directory /path/dir_name to filename"tar Compress /path/dir_name to filename"tar"g0 Compress /path/dir_name to filename"tar" 02

3nstall rpm called pac(age"rpm 3nstall rpm called pac(age"rpm y force #pgrade rpm called pac(age"rpm Delete rpm called pac(age"rpm 5ist files in not-installed rpm called

rpm -4l pac(age"rpm rpm -4 str rpm -4f /path/application_name ,tarting and ,toping start$ shutdown -h now halt shutdown -r now re oot shutdown -r 71%

pac(age"rpm 5ist files in installed rpm called pac(age"rpm 5ist installed rpms containing the string str Display the rpm that contains application application_name

,tart the 6 system ,hutdown the system now and do not re oot ,ame as a ove Re oot ,ame as a ove Re oot in 1% minutes

!ounting filesystems mount -t vfat !ount the first partition 1 of the first hard dis( drive /dev/sd*a+*1+ a which is in fat82 vfat dormat under /mnt/c_drive /mnt/c_drive directory mount -t iso9::% /dev/cdrom !ount cdrom under /mnt/cdrom directory /mnt/cdrom umount /mnt/hda1 #nmout the a ove

#ser administration users Display users currently logged in adduser username Create a new user called username passwd username Define password for user called username who 5ist logged-in users whoami Display current user finger username Displays info a out user username su 5og in as root from current login su 5og in as root from current login and ta(e root;s path e$it <$it from console login *ie, logout+" =rocesses command command >

<$ecute command in the foreground <$ecute command in the ac(ground

ctrl70 ctrl7c ps (ill -9 pid top

,uspend a program 3nterrupt a program 5ist all processes ?ill process with id pid !onitor processes in real time

Potrebbero piacerti anche