Active Members MrGrj Posted January 18, 2015 Active Members Report Posted January 18, 2015 (edited) mkdir– make directoriesUsage: mkdir [OPTION] DIRECTORY…eg. mkdir lhnls– list directory contentsUsage: ls [OPTION]… [FILE]…eg. ls, ls *l, ls lhncd– changes directoriesUsage: cd [DIRECTORY]eg. cd lhnpwd*- print name of current working directoryUsage: pwdvim– Vi Improved, a programmers text editorUsage: vim [OPTION] [file]…eg. vim lhn.txtcp – copy files and directoriesUsage: cp [OPTION]… SOURCE DESTeg. cp sample.txt sample_copy.txtcp sample_copy.txt target_dirmv– move (rename) filesUsage: mv [OPTION]… SOURCE DESTeg. mv source.txt target_dirmv old.txt new.txtrm* remove files or directoriesUsage: rm [OPTION]… FILE…eg. rm file1.txt , rm *rf some_dirfind– search for files in a directory hierarchyUsage: find [OPTION] [path] [pattern]eg. find file1.txt, find *name file1.txthistory– prints recently used commandsUsage: historycat– concatenate files and print on the standard outputUsage: cat [OPTION] [FILE]…eg. cat file1.txt file2.txtcat *n file1.txtecho– display a line of textUsage: echo [OPTION] [string] …eg. echo I love RSTecho $HOMEgrep*- print lines matching a patternUsage: grep [OPTION] PATTERN [FILE]…eg. grep *i apple sample.txtwc*- print the number of newlines, words, and bytes in filesUsage: wc [OPTION]… [FILE]…eg. wc file1.txtwc *L file1.txtsort– sort lines of text filesUsage: sort [OPTION]… [FILE]…eg. sort file1.txtsort *r file1.txttar– to archive a fileUsage: tar [OPTION] DEST SOURCEeg. tar *cvf /home/archive.tar /home/originaltar *xvf /home/archive.tarkill– to kill a process(using signal mechanism)Usage: kill [OPTION] pideg. kill *9 2275ps– report a snapshot of the current processesUsage: ps [OPTION]eg. ps, ps *elwho– show who is logged onUsage: who [OPTION]eg. who , who *b , who *qpasswd– update a user’s authentication tokens(s)Usage: passwd [OPTION]eg. passwdsu– change user ID or become super*userUsage: su [OPTION] [LOGIN]eg. su remo, suchown– change file owner and groupUsage: chown [OPTION]… OWNER[:[GROUP]] FILE…eg. chown remo myfile.txtchmod– change file access permissionsUsage: chmod [OPTION] [MODE] [FILE]eg. chmod 744 calculate.shzip– package and compress (archive) filesUsage: zip [OPTION] DEST SOURSEeg. zip original.zip originalunzip– list, test and extract compressed files in a ZIP archiveUsage: unzip filenameeg. unzip original.zissh– SSH client (remote login program)“ssh is a program for logging into a remote machine and for executing commands on a remote machine”Usage: ssh [options] [user]@hostnameeg. ssh *X guest@10.105.11.20scp– secure copy (remote file copy program)“scp copies files between hosts on a network”Usage: scp [options] [[user]@host1:file1] [[user]@host2:file2]eg. scp file1.txt guest@10.105.11.20:~/Desktop/fdisk– partition manipulatoreg. sudo fdisk *lmount– mount a file systemUsage: mount *t type device direg. mount /dev/sda5 /media/targetunmount– unmount file systemsUsage: umount [OPTIONS] dir | device…eg. umount /media/targetdu– estimate file space usageUsage: du [OPTION]… [FILE]…eg. dudf– report filesystem disk space usageUsage: df [OPTION]… [FILE]…eg. dfquota– display disk usage and limitsUsage: quota [OPTION]eg. quota *vreboot– reboot the systemUsage: reboot [OPTION]eg. rebootpoweroff – power off the systemUsage: poweroff [OPTION]eg. poweroffkate– KDE Advanced Text EditorUsage: kate [options][file(s)]eg. kate file1.txt file2.txtvim– Vi Improved, a programmers text editorUsage: vim [OPTION] [file]…eg. vi hello.cgedit* A text Editor. Used to create and edit files.Usage: gedit [OPTION] [FILE]…eg. geditbg– make a foreground process to run in backgroundUsage: type ‘ctrl+z’ and then ‘bg ‘fg– to make background process as foreground processUsage: fg [jobid]jobs– displays the names and ids of background jobsUsage: jobssed* stream editor for filtering and transforming textUsage: sed [OPTION] [input*file]…eg. sed ‘s/love/hate/g’ loveletter.txtawk* pattern scanning and processing languageeg. awk *F: ‘{ print $1 }’ sample_awk.txtfind* search for files in a directory hierarchyUsage: find [OPTION] [path] [pattern]eg. find *name file1.txtlocate– find or locate a fileUsage: locate [OPTION]… FILE…eg. locate file1.txtLinux File Permissions3 types of file permissions – read, write, execute10 bit format from ‘ls *l’ command1 2 3 4 5 6 7 8 9 10file type owner group otherseg. drwxrw*r** means owner has all three permissions, group has read and write, others have only readpermissionread permission – 4, write – 2, execute *1eg. rwxrw*r** = 764673 = rw*rwx*wx Edited January 18, 2015 by MrGrj 1 Quote