Lab 2

The command mkdir creates a directory. The command mkdir is in format mkdir [option].

mkdir1

 

The command cp allows users to copy files or directory’s. Additionally, if the new destination for the copied file does not exists the cp command creates the new file. The synopsis for the cp command is cp [OPTION]…SOURCE DEST.

cp1 cp2

The mv command allows users to move files or rename files. This is demonstrated below as dir_1 is moved into dir_2. The mv command allows users to move files anywhere in the computer without needing to constantly drag and drop. The synopsis is in mv file1 file2.

mv1 

mv2  mv3

 

The rm command allows users to remove files from anywhere within the computer. In the pictures below the file lazy_dog.text is deleted by writing rm lazy_dog.text.

rm1 rm2

The help command displays the information of a specific command. It displays to the user all options that can be used with that specific command. Additionally, the help command can be used to test an argument.

help

 

The man command displays the manual for a specific command, which teaches users how to use a command. They provide extensive documentation about commands and other aspects of the system, including configuration files, system calls, library routines and the kernel.

man 1 man 2 man3 

 

The whatis command displays a one line manual discription for a macthing keyword.

whatis

 

 

The alias command allows the user to create there own composite command that can be made up of multiple commands. The format for the alias command is name=’command1; command2;’. In the images below the composite command cool changes the directory to usr/bin and calls the help command to demonstrate the options for the alias command.

alias

Leave a Reply

Your email address will not be published. Required fields are marked *