Basic Unix commands-4

16. man command: 

It is short form of manual.

It provides in depth information about the requested command.

Syntax: man command_name [options]



man command unix/linux


17. whoami command

Prints the user name associated with the current effective user Id.

Syntax: whoami

whoami command linux

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: 
  1. it moves a group of files to a different directory and 
  2. 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_solutions$ mv display_info.sh ../ 

20. nl command

It numbers the lines in a file.

Syntax: nl [options] [file_name]



Comments

YouTube

Popular posts from this blog

GTU OOP Program - 18

GTU OS Program - 7

GTU OS Program - 3