Lab#5

Lab 5 Description

In this lab we will test the following commands: apt-get update, ping, netstat, wget, locate, gzip, gunzip, tar, zip, and unzip.

Command apt-get update:

The following command allows the user to update the system packages by looking in the Linux repository. This command is similar to an update in windows. In the following we try to update the the system but access is denied because we do not have administrator access or root access. In order to update the system sudo must be used in conjunction with the command.

apt get update

Command ping:

The following command allows the user to test network connection of a remote location and see if a connection can be established. In the following case the ping command is used to test the connection to the localhost computer.

ping

Command netstat:

The following command allows the user to view network information and settings such as links that are currently in use. In addition, it shows a routing table for all connections in use.

netstat

Command wget:

The following command allows the user to download files from a website. In the following what is done is used to establish a connection to www.google.com and then followed by a command to get the file for the webpage that shows when the user visits the website.

wget

Command locate:

The following command allows the user to perform a search for the path name and then outputs all related items with the name. In the following case we search for all text based files within home directory and all its sub directories.

locate

Command gzip:

The following command allows the user to compress one or more file. In the following case the foo.txt is created and then using the gzip command is compressed.

gzip

Command gunzip:

The following command allows for the user to decompress a file. In the following case the foo.txt that was compressed is decompressed back into a text file.

gunzip

Command tar:

The following command allows the user to archive files. In the following case the desktop directory is archived. Then to retrieve the stored information using the tar xvf desktop.tar command

tar

Command zip:

The following command allows the user to compress and archive files. This tool combines both the gzip and tar command into one function. In the following case foo.txt and input_file.txt are compressed and archived into the text.zip.

zip

Command unzip:

The following command allows the user to decompress and retrieve the file that are stored in the zip file. In the following case the text.zip file is decompressed and then the two text files are retrieved from within.

unzip

 

Leave a Reply

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