Monday, January 10, 2011

command in linux

[kismec11@localhost ~]$ su
Password:
[root@localhost kismec11]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog
[root@localhost ~]# mkdir dog
[root@localhost ~]# cd dog
[root@localhost dog]# ls
[root@localhost dog]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  dog  install.log  install.log.syslog
[root@localhost ~]# cd dog
[root@localhost dog]# mkdir cat
[root@localhost dog]# cd cat
[root@localhost cat]# mkdir mouse
[root@localhost cat]# cd mouse
[root@localhost mouse]# cat >mickey.txt
apple.txt
oren.txt
grape.txt
ciku.txt
[root@localhost mouse]# cat mickey.txt
apple.txt
oren.txt
grape.txt
ciku.txt
[root@localhost mouse]# cat >BBQ.txt
ayam.list
nugget.list
roaster.list
[root@localhost mouse]# cat BBQ.txt
ayam.list
nugget.list
roaster.list
[root@localhost mouse]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  dog  install.log  install.log.syslog
[root@localhost ~]# cd dog
[root@localhost dog]# ls
cat
[root@localhost dog]# cd cat
[root@localhost cat]# ls
mouse
[root@localhost cat]# cd mouse
[root@localhost mouse]# ls
BBQ.txt  mickey.txt
[root@localhost mouse]# cat mickey.txt
apple.txt
oren.txt
grape.txt
ciku.txt
[root@localhost mouse]# cat BBQ.txt
ayam.list
nugget.list
roaster.list
[root@localhost mouse]# ls
BBQ.txt  mickey.txt
[root@localhost mouse]# mv mickey.txt mouse.txt
[root@localhost mouse]# ls
BBQ.txt  mouse.txt
[root@localhost mouse]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  dog  install.log  install.log.syslog
[root@localhost ~]# cd dog
[root@localhost dog]# ls
cat
[root@localhost dog]# cd cat
[root@localhost cat]# cat >mickey.txt
apple.txt
oren.txt
grape.txt
ciku.txt
[root@localhost cat]# ls
mickey.txt  mouse
[root@localhost cat]# cat >BBQ.txt
ayam.list
nugget.list
roaster.list
[root@localhost cat]# ls
BBQ.txt  mickey.txt  mouse
[root@localhost cat]# cd mouse
[root@localhost mouse]# ls
BBQ.txt  mouse.txt
[root@localhost mouse]# rm mouse.txt
rm: remove regular file `mouse.txt'? y
[root@localhost mouse]# ls
BBQ.txt
[root@localhost mouse]# rm BBQ.txt
rm: remove regular file `BBQ.txt'? y
[root@localhost mouse]# ls
[root@localhost mouse]# cd cat
bash: cd: cat: No such file or directory
[root@localhost mouse]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  dog  install.log  install.log.syslog
[root@localhost ~]# cd dog
[root@localhost dog]# ls
cat
[root@localhost dog]# cd cat
[root@localhost cat]# ls
BBQ.txt  mickey.txt  mouse
[root@localhost cat]# cat BBQ.txt
ayam.list
nugget.list
roaster.list
[root@localhost cat]# cat mickey.txt
apple.txt
oren.txt
grape.txt
ciku.txt
[root@localhost cat]# cd mouse
[root@localhost mouse]# ls
[root@localhost mouse]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  dog  install.log  install.log.syslog
[root@localhost ~]# cd dog
[root@localhost dog]# ls
cat
[root@localhost dog]# cd cat
[root@localhost cat]# ls
BBQ.txt  mickey.txt  mouse
[root@localhost cat]# cp BBQ.txt
cp: missing destination file operand after `BBQ.txt'
Try `cp --help' for more information.
[root@localhost cat]# cp BBQ.txt cat
[root@localhost cat]# ls
BBQ.txt  cat  mickey.txt  mouse
[root@localhost cat]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  dog  install.log  install.log.syslog
[root@localhost ~]# cd dog
[root@localhost dog]# ls
cat
[root@localhost dog]# cd cat
[root@localhost cat]# ls
mouse  mouse.txt
[root@localhost cat]# cd mouse
[root@localhost mouse]# ls
BBQ.txt  mouse.txt
[root@localhost mouse]# cd
[root@localhost ~]# ls
anaconda-ks.cfg  dog  install.log  install.log.syslog
[root@localhost ~]# cd dog
[root@localhost dog]# ls
cat
[root@localhost dog]# cd cat
[root@localhost cat]# ls
mouse  mouse.txt
[root@localhost cat]# rm mouse.txt
rm: remove regular file `mouse.txt'? y
[root@localhost cat]# ls
mouse
[root@localhost cat]# cd mouse
[root@localhost mouse]# ls
BBQ.txt  mouse.txt
[root@localhost mouse]# cp /root/dog/cat/mouse/mouse.txt /root/dog/cat/mouse.txt
[root@localhost mouse]# ls
BBQ.txt  mouse.txt
[root@localhost mouse]#