$ whoami : It will display currently logged in username
$ pwd : present working directory $ date : To display current date $ cal : To display calendar touch : it is used to create empty file To display files, we will use 'ls' command To create a file with data we will use 'cat' command To create directory we will use 'mkdir' command To remove the file we will use 'rm' command To remove empty directory we will use 'rmdir' command 'ls' is used to list out all files & directories available in the given directoryNote: we can pass several options for 'ls' commands
ls : It will display all files in alphabetical order (a to z)
ls -r : It will display all files in reverse of alphabetical order (z to a) ls -l : It will display long listing of files
(Self Explore more options with ls)
To delete a file we will use 'rm' command
To delete empty directory we will use 'rmdir' command To delete non-empty directory we will use 'rm' command To display file content we will use 'cat' command
To display file content with line numbers we will use '-n' option with cat. Copy one file data into another file using 'cat' command
The default editor that comes with the LNIX operating system is called vi (visual editor). Using vi editor, we can edit an existing file or we create a new file from scratch
There are three modes of operations in vi:
1) command mode 2) insert mode 3) escape mode
Linux File permissions:
=> In Linux everything will be represented as a file => To protect our data, we need to manage file permissions => We have 3 types of permissions for the files in linuxr ===> read w ===> write x ===> execute => Linux file permissions are divided into 3 sections
Owner , Group and Permission.
To change file permissions, we will use 'chmod' command
$ chmod u+x f1.txt Self Explore (Number System) to modify the File Permissions