Download presentation
Presentation is loading. Please wait.
Published byEdward Parsons Modified over 9 years ago
1
Linux File System and The Shell Yonglei Tao
2
Linux File System Consists of one or more self-contained file management units each is known as a filesystem A file is a collection of related information including anything from which data can be taken or to which data can be sent
3
Basic Commands file fname ls dir ls –F ls –a cd ~ cd.. Variable PATH mv f1 f2 … dir mv oldf newf rm f1 f2 … rmdir d1 d2 mkdir name cp f1 d1 cp f1 f2
4
Access Permission User types: owner, group, and other Access rights: r, w, and x ls –l chmod a+rw letter.txt chmod o-wx report.ps umask umask 022
5
Record Your Session script …… exit script mySession …… exit
6
Command Line Syntax gcc –o proj proj.c ls ls –r ls –x ls –rx ls -xr ls –r -x ls -- help
7
Display Message echo “a message” echo –e “enter filename: \c” echo $PATH printf “My Shell is %s\n” $SHELL
8
Standard Input/Output and Redirection cat filename cat file1 file2 file3 > largefile cat cat < largefile cat > newfile.txt cat file1 file2 >> file3 date > whoson who >> whoson cat whoson
9
Pipes and Filters who | sort grep date date.c cat date.c | grep date grep date temp who | sort | wc who | sort | tee who.out | wc -l
10
Filename Expansion (Wildcards) ls proj?.c echo proj* ls *.txt echo [aeiou]* echo [x-z]* ls part[a-d][0-4]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.