You are on page 1of 7

Sheet1

Task Create Folder Move Folder Copy Folder compression Delete Folder Command Folders mkdir mv -r /home/joe/Desktop/new_folder /original_path/original_folder /destination_path/copied_folder cp -r /original_path/original_folder /destination_path/copied_folder tar -czvf filename.tgz /path/of/folder/to/be/compressed tar -xzvf filename.tgz -C /path/to/folder rm -rf /home/useless_parent_folder Files Move File Copy File Delete File Running files mv /source_path/original /destination_path/copy cp /source_path/original /destination_path/copy rm /home/joe/file_to_be_deleted ./file_to_be/executed

Permissions to see permissions ls -l chmod <user/group/other/all> <+/-/=> <read/write/execute> filename change owner of filechown user1 filename chmod <user/group/other/all> <+/-/=> <read/write/execute> -R /path/to/folder Devices check status mounting unmounting lsusb lspci sudo mount -t <device filesystem type> sudo umount /device/path

/device/path /mounting/point <extra ownership options>

Directory Current path List of files pwd ls cd /fake/directory/path change directory cd .. cd -

random gksudo gedit /path/to/file top grep hello .* filename grep hello .* /file/path/* find -iname /path/to/be/searched/ '*.txt' Command1 | command2 Command1 && command2 multiple commands Command > filename Command >> filename ls file* wildcards ls file?

Page 1

Sheet1

u are not root | # sign at prompt says you are root. To get # run 'sudo su' sudo apt-get install package_name

Task

Command Vi editor vi filename -wq -w -q! less less filename spacebar b q

Page 2

Sheet1
Description Folders Creates folder new_folder at specified path Comments used from anywhere

Deletes entire useless_parent_folder and its subfolders Files

-c creates archive | -z compresses using gzip | -v displays progress -x decompresses -r stands for recursive. f stands for force

creates copy of original located in source_path and places copied file named 'copy' in destination_path folder Deletes file file_to_be_deleted from specified path used from anywhere runs the file specified by the path Permissions

-u user or owner of filename | -g group | -o other | -a all (same as ug changes owner of filename to user1 change permissions of all files in specified folder

Devices checks if usb is still connected checks devices connected to PCI extra ownership options>

filesystem can be FAT or NTFS

Directory shows current path shows list of files in current path changes current directory to specified path one level up previous directory

random gksudo is same as sudo but is used for opening graphical applications (sudo is used for executing single line commands prints list of current executing processes searches for all possible occurances of hello in the file filename searches for all possible occurances of hello in all files in given path searches for all .txt files in specified path takes output of command1 and gives it as input to command2 execute command1 and then execute command2 writes output of command to file called filename (creates filename if it doesnt exist) appends output of command to existing file called filename lists all files with name containing the word file lists all files with names such as file1 file2 filex etc

Page 3

Sheet1
to get superuser or root installing packages

Description Vi editor creates filename save and exit save dont exit discard current changes and exit less opens large file for viewing next page back page exit

Comments

Page 4

Sheet1

sses using gzip | -v displays progress | -f archives the filename

stination_path folder

-g group | -o other | -a all (same as ugo) | + means add permission | - means remove permission | = means set permission | r- read only | -w

executing single line commands

Page 5

Sheet1

Page 6

Sheet1

means set permission | r- read only | -w read and write | -x read write and exexute

Page 7

You might also like