Linux Bash Commands Flashcards
What command is used to list files and directories in the current directory?
ls
True or False: The command ‘cd ..’ is used to move to the parent directory.
True
Fill in the blank: The command to change permissions of a file is _____ .
chmod
What command is used to display the current working directory?
pwd
Which command is used to create a new directory?
mkdir
True or False: The ‘rm’ command is used to rename files.
False
What does the command ‘cp’ do?
It copies files or directories.
What command can be used to search for a specific text within files?
grep
Fill in the blank: The command _____ is used to display the contents of a file.
cat
What command is used to move or rename files?
mv
True or False: The command ‘touch’ is used to create an empty file.
True
What does the ‘echo’ command do?
It displays a line of text or a variable value.
Which command is used to display the last few lines of a file?
tail
What command is used to display the first few lines of a file?
head
Fill in the blank: The command _____ is used for file compression.
gzip