Download presentation
Presentation is loading. Please wait.
1
Introduction to Linux Commands
2
Shells Create processes that execute user commands. bash sh csh tcsh
ksh
3
Commands Typically, programs. Format:
$ command [command-options(s)] arguments … Some commands options have their own arguments. Ex. ls –l *.dat fgrep –i foot f1.dat f2.dat f3.dat Help is available. man ls
4
Categories Files/file system Processes Networking Program development
Misc.
5
Files/file system cat cd chmod cp fgrep find gzip/gunzip head ls mkdir
more mv od pwd rm tail tar wc
6
Processes & ctrl-z, bg, fg kill nice, renice ps top
7
Networking ftp hostname ping ssh traceroute
8
Program development g++ gdb gprof make sccs, cvs talk vi
9
Misc. date echo exit history man sort which who whoami
10
Pipes and I/O redirection
Programs (including commands) typically read from stdin (typically the keyboard) and write to stdout (typically the screen/window).
11
Input redirection Input redirection is used to make input come from a file. sort 12 1 19 ctrl-d sort < junk.data sort junk.data
12
Output redirection Output redirection is used to make output go to a file. sort junk.data sort junk.data > junk-sorted.data
13
Pipes Chain the output of one program to the input of another. Ex.
fgrep –i xray f1.dat f2.data … fn.dat | more ls -l | fgrep –i chest | fgrep –i xray > results.txt
14
Windows Windows has a rudimentary shell called the command prompt.
It supports pipes and I/O redirection as well (using the exact same characters: |, <, and >).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.