Learning Unix Flashcards
how to check hostname?
hostname
How to check your current location
pwd
How to check system date and time
date
how to check system date/ Current date
date +%D
How to check system time
date +%T
How to check only hour
date +%H
How to check with Hour with min
date +%H:%M
How to check file and directory/ Folder we have in present location
ls
How to display the detail explanation about files and folder
ls -ltr
How to know the file size in kb/mb
ls -lh
How to clear the terminal
clear
How to create any folder
mkdir folder_name/directory
how to enter new folder
cd folder_name
how to create file
touch file_name
So that means you can actually add any file you’d like
How to open any file name
cat file_name
view file_name
less file_name ( Shift+g is to go last line of the terminal ….. press p to read the first line
How to edit any existing file
vi file_name
How to remove/delete any file
rm file_name
how to delete folder/directory
rmdir folder_name OR rm -rf folder_name
How to change/rename existing file_name
mv old_file_name new_file_name
How to move one file from one location to another
mv file_name path(where we want to move that file)