Linux Commands Flashcards
(137 cards)
What command is used to list files in Linux?
ls
What command provides a detailed list of files?
ls -l
How do you list hidden files in Linux?
ls -a
What command shows the current directory?
pwd
How do you change directories in Linux?
cd
What is the shortcut to navigate to the home directory?
cd ~
How do you move up to the parent directory?
cd ..
What command is used to copy files?
cp
How can you copy files recursively?
cp -r
What command is used to move or rename files?
mv
How do you remove a file in Linux?
rm
What command removes a directory?
rm -r
How do you forcefully remove a file?
rm -f
What command is used to create a directory?
mkdir
How do you create an empty file?
touch
What command displays file contents?
cat
How can you view a file page by page?
less
What command shows the first 10 lines of a file?
head
What command shows the last 10 lines of a file?
tail
How do you follow changes to a file in real-time?
tail -f
What command is used to find files?
find
How do you search for text within files?
grep
What command allows recursive text searching?
grep -r
How do you perform a case-insensitive search with grep?
grep -i