0% found this document useful (0 votes)
17 views8 pages

Os Lab 2

Uploaded by

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

Os Lab 2

Uploaded by

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

Lab instructor : ma’am amna Department : CS

Batch: CS - 22 Name: Brekhna Afridi

Nutech ID: f22605049

In-Lab Tasks

Task 1:

 Execute all the commands on the Ubuntu terminal?


 Explain all the commands and attach their screenshots (mandatory)?

Sol:

 Pwd
 Pwd –L , Pwd –

 Mkdir newdir (it will create a new directory)


 Mkdir newdir/new1 (it will create a directory in a directory)
 Mkdir –p newdir/new1 (it will create a directory with in a directory in one go)
 Mkdir –p newdir/A/B/C/D
 Mkdir –p newdir/{A,B}
 Man mkdir ()

Show how all commands of mkdir


Commands :
1. Ls

2. Ls (Folder name)

3. Ls/ (it will show files of root directory)

4. Ls *.txt (it will show all text files)

5. Ls Foldername/*.txt (it will show text files of a specific folder)

6. Ls.. (one step back)

7. Ls../.. (two step back)

8. Ls –l (file permissions, size, date)


9. Ls –a (show hidden files)

10. Ls –s (show file memory in KB)

11. Ls –d*/ (show directories)

12. Ls –al (combination of all)


13. Ls –ls (show file permission with memory size)

14. Ls –L>New.txt (it will store the output of ls command in text file)

15. Man ls (show all commands of ls)


Copying and moving files :

You might also like