0% found this document useful (0 votes)
5 views7 pages

Lab Task 3 Os

The document outlines a series of Linux lab tasks for a user named Bushra, focusing on exploring directories, creating and managing files, working with file content, adjusting file permissions, and searching for files. Each task includes step-by-step instructions and verification steps to ensure successful completion. The tasks cover basic Linux commands and file management techniques.

Uploaded by

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

Lab Task 3 Os

The document outlines a series of Linux lab tasks for a user named Bushra, focusing on exploring directories, creating and managing files, working with file content, adjusting file permissions, and searching for files. Each task includes step-by-step instructions and verification steps to ensure successful completion. The tasks cover basic Linux commands and file management techniques.

Uploaded by

bushrafayyaz252
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
Linux Lab Tasks and Solutions (For User: bushra) Task 1: Exploring Directories Step 1: Check Your Current Directory ‘This will show your current location Step 2: Move to the Home Directory Use bah < Verify bah Itchould output Jromabuches Step 3: Navigate to the Root Directory Use ed/ List the contents: bah ls Youll soe directories ke bin, boot, hase, ete, ete Step 4: Go to the Home Directory This willshow all user dectories, ncluding bushrs Step 5: Return to Your Home Directory ban ce /hone/ bushes pw The cutput should be: {rone/pusnea coy vem cory wes Ocoy Eat Task 2: Creating and Managing Fil Step 1: Create a File Named shakespeare echo -e “Shall I comers thee to @ sumer’s day?\eThou art more lovely and more temperate” > Verify ban cat shakespeare Step 2: Rename the File to sonnet-18.txt ban OCny 7 Es rv shakespeare sonnet-18. txt Checks ban ls Step 3: Create a Directory poetry Verify ls Step 4: Move the File Into poetry fav sonnes-18.00¢ postry/ Checie ban 1s poetry pol Ocony ves ves Task 3: Working with File Content Step 1: Create a New File ocean. txt bah 8 Copy ¥ Eat Verify ban Dep v Eat Step 2: Append New Lines be 2 copy Eat fecno “wight 211s with a wnasperang breeze” >> ocean.txt Check the updated fe: ban 8 copy Eat Step 3: Count Lines, Words, and Characters bah OCany vest Example output This means: dines © 1Swods 100 characters Task 4: and Directory Permissions Step 1: Check File Permissions Example output Step 2: Make the File Read-Only Verity Now, only read ( Step 3: Remove Write Protection ) permission is there, ban heed at ocean.txt Verify Bony» 2 ony Task 5: Searching and Fin Step 1: Search for a Wore Find biee Step 2: Find All .txt Files ban Find rene ype -nane "*.t3t Step 3: Locate a Specific File Find, sounet-a8.tet ban Find rene ocean. txt ype # -nane “sonnet 18.txt Oop 7 Est cop 7 Est

You might also like