Вы находитесь на странице: 1из 2

LAB SESSION 3

EXPERIENCE LINUX

Log on to the Linux computer using your account and password.


Make use of the following commands and give a description for it by yourself.

ls *.c ......................................................................................................................................
ls *.[ch] ......................................................................................................................................
ls *[0-9]*.c ................................................................................................................................
ls ab?de.c ....................................................................................................................................
ls –ua .....................................................................................................................................
mkdir /home/user/MARY
cd /home/user/MARY
touch A AP APP APPL APPLE APPLE1
ls ...........................................................................................................................................
find /home/user/MARY -name “A*” ..........................................................................................
find /home/user/MARY -name “A*” -exec rm {} \*
ls –l .....................................................................................................................................................

mkdir /home/user/MARY/TOM
mkdir /home/user/MARY/DICK
mkdir /home/user/MARY/HARRY
find MARY -name "*" -type d -mtime -3 ....................................................................................

find MARY -name "*" -type d -mtime -3 > Output.txt...............................................................


touch /home/user/MARY b ba bat bal ball
find -name "b*" -exec mv {} HARRY \;
ls –l .....................................................................................................................................................

ls-l
find -name "b*" -exec chmod 444 {} \;
ls –l ................................................................................................................................................

cd /home/user
ls-l
ln Emp.dat hardlink
ln -s file1 symblink
ls –l ................................................................................................................................................

cat > team


hello
cat team
cat >>team
how are you
hope doing great
rest in next
cat team .................................................................................................................................
cat team |head -2................................................................................................................................
LAB SESSION 3
cat team |tail -1.................................................................................................................................

dd if=”team” of=”uteam” conv=ucase


cat uteam..........................................................................................................................................
nl /home/user/MARY/HARRY/b .....................................................................................................
tac /home/user/MARY/HARRY/b....................................................................................................
man lpr .............................................................................................................................................
clear.....................................................................................................................................................
uname..................................................................................................................................................
history.................................................................................................................................................

x=7

y=10

expr $x + $y .......................................................................................................................................

expr $x \* $y........................................................................................................................................

bc

10 + 20 .................

a=7
v=9
a*v ....................

12/5 ....................

scale =2
12/5 .........................

echo $HOME......................................................................................................................................

echo $PATH........................................................................................................................................

chown team user1.........................................................................................................................

chgrp G3 Emp.dat..............................................................................................................................

Вам также может понравиться