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

Unix Commands: Navneet Sharma

This document provides an overview of basic UNIX commands. It begins by describing what UNIX is - an operating system made up of a kernel, shell, and programs where everything is a file or process. It then discusses basic file navigation commands like ls, mkdir, touch, rm and how to view the current directory with pwd. Finally, it outlines common file manipulation commands such as cp, mv, cat, less, head, tail, grep, wc and how to use redirection and pipes.

Uploaded by

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

Unix Commands: Navneet Sharma

This document provides an overview of basic UNIX commands. It begins by describing what UNIX is - an operating system made up of a kernel, shell, and programs where everything is a file or process. It then discusses basic file navigation commands like ls, mkdir, touch, rm and how to view the current directory with pwd. Finally, it outlines common file manipulation commands such as cp, mv, cat, less, head, tail, grep, wc and how to use redirection and pipes.

Uploaded by

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

UNIX

COMMANDS
NAVNEET SHARMA

ABOUT UNIX

Operating system which was first developed in the 1960s, and


has been under constant development ever since.

Made up of three parts; the kernel, the shell and the programs.

Everything in UNIX is either a file or a process.

A process is an executing program identified by a unique PID


(process identifier).

A file is a collection of data. They are created by users using


text editors, running compilers etc.

UNIX TREE

BASIC COMMANDS
When you first login, your current working directory is your home
directory. Your home directory has the same name as your username, for example, nsharma03, and it is where your personal files
and subdirectories are saved.
ls (list)
ls a (for hidden files and directories)
ls ltr (for detailed list in sorted fashion)
mkdir (make directory)
check with ls what got created
touch (create a file)
touch <filename>
rm
rm r for a recursive deletes, used for directories

BASIC COMMANDS

pwd (print working directory)


. and .. directories (present in every directory)
~ (home directory)

cp (copy)
cp file1 file2

mv (move)
or rename (if moved with a different name in same directory)

cd (change directory)
cd (will take to home directory)
cd will take to previous directory

BASIC COMMANDS

clear(clear screen)

cat(concatenate)
display the contents of a file on the screen.
cat test.txt

less
writes the contents of a file onto the screen a page at a time
less test.txt

head
writes the first ten lines of a file to the screen.
head test.txt
head -5 test.txt

BASIC COMMANDS

tail
writes the last ten lines of a file to the screen
tail test.txt
tail -100 test.txt

grep
searches files for specified words or patterns
grep science test.txt
grep -i science test.txt
grep -i science test test.txt

wc (word count)
wc l test.txt wc w test.txt

BASIC COMMANDS

redirection
grep find test.txt > find.txt

pipes
wc l test.txt | head -10

vi .bashrc

You might also like