You are on page 1of 16

Assignment

(BSSEF11 Afternoon)
Prepared by:
BSEF11A017 Usama Hafiz Muhammad

Submitted To:
Miss Saadia Shehzad

Introduction To Computing

Date:

26th

January 2012

Punjab University College of Information Technology


1. To check all the logged in users to the Unix machine

Show listing of users logged-in on your system

:~> last

2. To display current date and your name, terminal, time and date when u logged in
For date, type: ~ > date For name, type : ~ > whoami : ~ >last We can check time and date when we logged in by typing last as above

3. To list the files in current directory Type ls to list the files :~>ls

4. To differentiate the files and directories from each other :~> ls -aF

5. To display file names line by line Type ls -1 to display file names line by line :~> ls -1 .

6. To display the hidden files and their types as well :~> ls a

7. To display the hidden files line by line with file types specified An invisible file is one whose first character is the dot. :~> ls a1

8. To view the contents of two files at a time :~/cat 1.txt 2.txt

9. To view the contents of a file in numbered format :~/Documents> cat n 1.txt

10. To display the characters in a file

no.

of

lines,

words

and

11. To bered contents of a file but the blank lines must be terminated :~/drive> cat b 1.txt

12. To show the line, word and character count individually :~> wc l :~> wc -w :~> wc m

13. To Copy a file from one place to other and also display the directory before and after copying the file cp 1.txt ../drive

14. To make a directory and then change its name


:~/ mkdir mydrive :~/ mv mydrive drive

15. To Delete at least 4 files in interactive mode :~> rm i 1 2 3 4

You might also like