Linux Flashcards
What command is used to display the current directory in Linux?
pwd command
How do you list all files, including hidden ones, in a directory?
ls -a command.
What is the purpose of the ‘ls’ command in Linux?
Lists files and directories in the current directory.
What is the purpose of the ‘pwd’ command?
Prints the current working directory.
How do you check the contents of a file without opening it?
cat command.
What is the command to display the last few lines of a file?
tail command.
How do you move a file from one directory to another in Linux?
mv command.
What is the purpose of the ‘mv’ command?
Moves or renames files/directories.
How do you search for a specific string in a file?
grep command.
What command is used to display the manual of a command in Linux?
man command.
How do you rename a file in Linux?
mv command (with the new name).
What is the purpose of the ‘cp’ command?
Copies files or directories.
How do you find out the current date and time in Linux?
date command.
What is the purpose of the ‘grep’ command?
Searches for a pattern in files.
How do you search for a file or directory in Linux?
find command.