Linux Commands Flashcards
Command to show current working directory?
pwd
Command to show the username?
whoami
________ is the top-most directory in Linux.
root directory
________ will take you to the parent directory or one step up.
cd ..
__________ command will take you to the previous used directory.
cd -
Different ways to clear the Linux screen?
clear
Ctrl + L
Command to show all the files or directories?
ls
Command to display the newest file or directory first?
ls -l
ls -lt
Command to display the oldest file or directory first?
ls -ltr
Command to display the oldest file in a directory first?
ls -lR
How to recursively print all the directories and files?
ls -R
Command to display all the files including the hidden files that are starting with dot(.)?
ls -a
What is the Linux command to print all files and folders recursively including the hidden files?
ls -R -a
or ls -Ra
or ls -aR
What does ls -latR command display?
Recursively display all files and directories including the hidden files based on timestamp i.e. the newest one first.
l - long listing.
a - including the hidden files.
t - new ones come first.
R - Recursively print all files and directories.
How to create an empty file?
touch filename