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

Introduction to Linux Commands Guide

This document provides instructions for Lab #2 on the Linux operating system. It lists various commands to use such as man, ls, cat, sort, cp, mv, head, tail, alias, cd, and du and explains how to view manual pages, list directory contents with different options, create and view files, sort data, copy and move files, view the start or end of files, create aliases, change directories, and estimate disk usage. The goal is to familiarize students with basic Linux commands.

Uploaded by

Anum Khursheed
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)
48 views8 pages

Introduction to Linux Commands Guide

This document provides instructions for Lab #2 on the Linux operating system. It lists various commands to use such as man, ls, cat, sort, cp, mv, head, tail, alias, cd, and du and explains how to view manual pages, list directory contents with different options, create and view files, sort data, copy and move files, view the start or end of files, create aliases, change directories, and estimate disk usage. The goal is to familiarize students with basic Linux commands.

Uploaded by

Anum Khursheed
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

SWE-204 OPERATING SYSTEMS SSUET/QR/114

LAB # 2

Introduction to Linux Operating System


Lab Task:
Search different options of rmdir command using man command.
 $clear

 $man ls (manual)

 ls

Linux Operating System 1 of 80


SWE-204 OPERATING SYSTEMS SSUET/QR/114

 -a

 ls -i

 ls -f

Linux Operating System 2 of 80


SWE-204 OPERATING SYSTEMS SSUET/QR/114

 ls -R

 ls *.c

 ls -a~

Linux Operating System 3 of 80


SWE-204 OPERATING SYSTEMS SSUET/QR/114

 $cat > newfile (creat file)

 $cat newfile (view file)

Linux Operating System 4 of 80


SWE-204 OPERATING SYSTEMS SSUET/QR/114

 $cat > unsorted

 $sort < unsorted

Linux Operating System 5 of 80


SWE-204 OPERATING SYSTEMS SSUET/QR/114

 $cp file1 file2

 $mv myfile newfile

Linux Operating System 6 of 80


SWE-204 OPERATING SYSTEMS SSUET/QR/114

 $head -2<filename>

 $tail -5<filename>

 $alias dir -ls

Linux Operating System 7 of 80


SWE-204 OPERATING SYSTEMS SSUET/QR/114

 $cd ~ $

 du -k

Linux Operating System 8 of 80

You might also like