Posts

Showing posts with the label Unix command

Basic Unix commands-4

Image
16. man command:  It is short form of manual. It provides in depth information about the requested command. Syntax : man command_name [options] 17. whoami command Prints the user name associated with the current effective user Id. Syntax: whoami 18. cp command Description: It will copy the content of source file to destination file. If the destination file does not exist, it will be created. If it exists then it will be overwritten without any warning. Syntax: cp [option] source destination/directory Here cat > is used to create a file and cat [filename] is used to display the content of the file 19. mv command Description: mv is short for move. It has two functions:  it moves a group of files to a different directory and  it renames a file. Syntax: mv [options] old_name new_name To move a file from one folder to the parent directory use tkanu025@hp:~/lab_solu...

Basic Unix commands-3

Image
11. uname command Syntax: uname [options] Description:      Used to print system Information -s     prints the kernel name -n     print the network node hostname -r     prints the kernel release -v     print the kernel version -m     prints the machine hardware name -o     prints the operating system 12. bc command It is used for command line calculator. It is similar to basic calculator. Syntax: bc [option] bc starts by processing code from all the files listed on the command line in the order listed. After processing all the files bc reads from the standard input. Code is executed as it is read. -q     To avoid bc welcome message -l     To include math library  functionalities quit    to quit the calculator. 13. tty Command prints the file name of the terminal connected to standard input. It w...

Basic Unix commands-2

Image
  6. ls command Syntax ls [options] Description: -a     shows all file including hidden files -d     If an argument is a directory it only lists its name not its contents -p     displays a slash(/) in front of all directories -r     reverses the order of how the files are displayed Output 7. Echo command It prints the given input string to standard output.(It is same as printf("") in c programming language). syntax: eco 'string' output 8. mkdir command This command is used to create a new repository Syntax: mkdir [options] [directory name] All options can be used as per requirements directory name is the mane of the folder which you want to create -m     set permission mode (as in chmode) -p     No error if existing, make parent directories as needed. -v     Print a message for each created directory 9. rmdir command Description: It is used...

Basic Unix commands

Image
If you are a windows user and haven't installed Ubuntu in your windows machine make sure you check out the guide on how to install ubuntu CLI in your system without virtual machine. Practice the basic commands of Linux/Unix. 1. Cal command Syntax: cal [options] [month] [year] Description: Cal displays a simple calendar. Output 2. Clear command Description: It clears the terminal screen. It clears your screen if this is possible, including its scroll back buffer. Clear ignores any command-line parameters that may be present. Syntax: clear Output 3. pwd: Displays the path of the present working directory. Syntax: pwd [options] Output 4. cd command Description:  It is used to change the directory. Used to navigate through different directories using Command line interface. .. is used with cd to go back to the previous directory. Syntax: cd [directory name] cd ~ is used to go t...

YouTube