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]
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_solutions$ mv display_info.sh ../
20. nl command
It numbers the lines in a file.
Syntax: nl [options] [file_name]
Comments