Provide commands for unix that will do the following a Under

Provide commands for unix that will do the following

a) Under your home directory make 2 subdirectories named ATT Verizon

b) Under ATT make 2 subdirectories named Customers Employees

c) Under Customers make 2 subdirectories named DC and VA

d) Use cat command and make a file in directory DC named Customer

e) Use cat command and make a file in directory VA named Customer

f) Now merge both Customer files from DC and VA directories and put them in directory Customers under directory ATT and name the file DCVA

g) Under directory Verizon make 2 subdirectories named North and South

h) Under directory south make a file named CustomerSouth

Describe at least 3 commands that you can use to read a file in Unix. ( read here means opening and viewing a file). Provide an example for each.

Solution

a) make 2 subdirectories named ATT Verizon under home directory
mkdir ATT Verizon

b) make 2 subdirectories named Customers Employees under ATT subdirectory
case 1) cd ATT
mkdir Customers Employee

or

case 2) Type the following command from home directory itself.
mkdir -p home/Customers home/Employee

c) make 2 subdirectories named DC and VA under Customers
case 1) cd Customers
mkdir DC VA

or

case 2) Type the following command from ATT directory itself.
mkdir -p ATT/DC ATT/VA

d) Use cat command and make a file in directory DC named Customer
cd /home/ATT/Customers/DC
cat > Customer.txt

e) Use cat command and make a file in directory VA named Customer
cd /home/ATT/Customers/VA
cat > Customer.txt

f) Merge both Customer files from DC and VA directories and put them in directory Customers under directory ATT and name the file DCVA
cat /home/ATT/Customers/DC/Customer.txt /home/ATT/Customers/VA/Customer.txt > /home/ATT/Customers/DCVA.txt

g) make 2 subdirectories named North and South under Verizon subdirectory
cd /home/Verizon
mkdir North South

h) Under directory south make a file named CustomerSouth
cd South
mkdir CustomerSouth

3 commands that you can use to read a file in Unix.
1) cat <filename.txt>
2) vi <filename.txt>
3) less <filename.txt>
4) more <filename.txt>
5) od -c <filename.txt>

Provide commands for unix that will do the following a) Under your home directory make 2 subdirectories named ATT Verizon b) Under ATT make 2 subdirectories nam
Provide commands for unix that will do the following a) Under your home directory make 2 subdirectories named ATT Verizon b) Under ATT make 2 subdirectories nam

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site