


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



file -> command is used to determine the type of a file --- file * -> to display all files type (if file start with special char use (. /) ) file directoryname/ to display files in this directory --- file [range]* ->To display the file type of files in specific range du -> command, short for disk usage, is used to estimate file space usage. options: -h, –human-readable: print sizes in human readable format -0, –null: end each output line with NULL -a, –all: write count of all files, not just directories find -> find [where to start searching from] [expression determines what to find] [-options] [what to find] (https://www.tecmint.com/35-practical-examples-of-linux-find-command/) TIP: to deal with files that starts with dash (-) first finish the command arguments with (--) then space then file name, or (. /-file) (preferred) TIP: to deal with a file with a space in its name use 'file name' or put () after each word like: cat file\ name TIP: to find a non-executable file use -> find. -type f -size 1033c -name "[[:print:]] ”! -executable -> [[:print:]] use to find readable files by human single dot(.) reference to current directory double dot(..) reference to parent directory echo-> direct the output into terminal directly cd-> (change directory) (path) pwd-> (print current directory)
cp-> (file to be coped) (destination) man-> (command) (display manual page to use the command) find-> (where to search) -options (-user -group -size) -name grep-> (string to match) (filename) (to search all files in dir use *) -i(ignore case) -v(inverse search) grep ^exmp ---> to find line start with exmp sort-> filename (sort lines alphicattly) uniq-> filename options(-c count) to print uniq file, -u (print uniq lines), -d (print deplicated lines), use sort before it strings-> used to extract text inside a binary file (return the string characters into files) base64 -> decoding(-d) and encoding(-n) tr-> translate (manimulate strings) tar-> to extract (.tar) -xf gzip-> compreess files (.gz) bzip2 command in Linux is used to compress and decompress the files (.bz2)
-Setuid, which stands for set user ID on execution, is a special type of file permission, It is a security tool that permits users to run certain programs with escalated privileges. -alias c = “clear” ---> to custom commands with another keywords, alias gg = "mkdir" -screen command in Linux provides the ability to launch and use multiple shell sessions from a single ssh session scrren --> create new attaced screen, screen -ls --> list all screens attached or not, screen -d id --> detaced sceen with this id, screen -r id --> reaatach -tmux -->https://www.howtogeek.com/671422/how-to-use-tmux-on-linux-and-why-its-better-than- screen/ Background job: When you enter an ampersand (&) symbol at the end of a command line Foreground: When you enter a command in a terminal window, the command occupies that terminal window until it completes. Stopped: If you press Control + Z for a foreground job, or enter the stop command for a background job, the job stops. Daemons (also known as servers) are processes that run continuously in the background and perform functions required by other processes.