0% found this document useful (0 votes)
34 views

CAB Lab - II

Cab 2 file

Uploaded by

checking558
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

CAB Lab - II

Cab 2 file

Uploaded by

checking558
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Application in Business

Course Code: MS3SE02

Lab Assignment -II

Q1. Run following linux command and write what they are doing (save a screen short):

Note: In Ubuntu, login and launch the command prompt (aka Terminal). The keyboard shortcut is
<CTRL><ALT><T>. Or, you can search for "Terminal" by clicking on the Dash button in the upper-left corner
(i.e., the Ubuntu equivalent of the Windows "start" button).

a) ls and ls -a (use . for see hidden file)

b) mkdir

c) mkdir LabMS3SE02

d) cd LabMS3SE02

e) cd ..

f)cd ~

g) pwd

Q2 Copy the file (Write appropriate comments)

a) cd LabMS3SE02

touch file1

cp file1 file2

cp file1 ../file2

Q3. Remove and movie

mv file1 file2

rm file2

rm -i file2

rmdir LabMS3SE02

clear

Q4. Run the following command?

Directories

mkdir xyz make the directory xyz


cd xyz change directory, down into xyz
cd .. go up one directory level
cd ~ go to your home directory
cd ~dannellys2 go to dannelly's home directory
ls list the contents of current directory
ls -a directory listing, including all hidden files
ls -l directory listing, show permission, edits dates, etc.
ls -al really long directory listing

File Manipulation

cp file1 file2 make a copy of file1 named file2


cat myfile show contents of myfile
more myfile show contents of myfile one screen at a time
head myfile show the top 10 lines of myfile
rm myfile remove myfile (delete it permanently)
rm * remove all files in current directory
rm -i * interactive removal - ask yes/no for each file
ls > bob redirect directory listing into the file named bob

who users logged into this machine


date today's date
cal calendar (many options)
man -k calendar list manual pages related to calendar
man cal manual page for the "cal" command
exit logout of system
logout logout of system
ctrl-d logout of system
ctrl-c kill the running program

Q5 Create a log file (see script command in lab one) showing how to do each of the following tasks:

1 - type the command whoami

2 - create a new directory named lab2

3 - change directories into lab2

4 - list all files, even hidden files (directory should be blank)

5 - create a new file that contains the calendar for this month

6 - list all files again, even hidden files (there should be just one file)
7 - display the entire contents of that new file

8 - delete the file

9 - aks the system for today's date

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy