Unit 4 Module 3 - Linux Bash Commands Flashcards
What command prints the working directory to the screen?
pwd
What command displays names of the files and directories in the current working directory?
ls
(LS)
What command navigates between directories?
cd
What command displays the content of a file?
Reading File Content Command
cat
What command displays just the beginning of a file? ( First 10 lines of text files )
Reading File Content Command
head
What command displays just the end of a text file? ( First 10 lines )
Reading File Content Command
tail
What command returns the content of a file one page at a time?
Reading File Content Command
less
What command searches a specified file and returns all lines in the file containing a specified string?
Searching for a certain keyword in a file
grep
grep OS updates.txt
grep is the command.
OS is the arguement we are looking for
updates.txt is the file we are looking into
Searching for a certain keyword in a file
What sends the standard output of one command as standard input to another command for further processing?
| (Piping)
What command searches for directories and files that meet a specified criteria?
find
find /home/analyst/projects searches for everything starting at the projects directory.
What do you call modifying the behavior of a command and commonly begins with a hyphen ( - ) ?
Options
What command creats a new directory?
mkdir
What command deletes a directory?
rmdir
What command creats a new file?
touch
What command deletes a file?
rm