Professional Documents
Culture Documents
AMIT SAINI
DICS TECHNOLOGIES
6-8 P.M.(TTS)
UNIX Intro.
CONTENTS
WHAT IS UNIX?
Making / Deleting / Renaming Directories
Working with Files
UNIX Intro.
What Is UNIX?
UNIX Intro.
1. Making / Deleting / Renaming
Directories
UNIX Intro.
Create a lab directory in your home directory:
cd ~
mkdir lab
UNIX Intro.
Delete the week1 directory:
rmdir week1
UNIX Intro.
2. Working with Files
UNIX Intro.
2.1. Creating a Text File
A quick way:
cat > file
UNIX Intro.
2.2. Listing Files
UNIX Intro.
less file Like more but more
powerful
UNIX Intro. 1
2.3. Filename Conventions
UNIX Intro. 1
2.4. Other Basic Commands
UNIX Intro. 1
List lines containing ‘Andrew’ in /etc/passwd
grep Andrew /etc/passwd
UNIX Intro. 1
2.5. Printing
UNIX Intro. 1
2.6. I/O Redirection
Most commands output to the screen
ls
Output can be redirected to a file with‘>‘:
ls > dir.txt
cal 1997 > year1997
UNIX Intro. 1
Concatenate two files:
cat f1 f2 > fs
UNIX Intro. 1