欢迎来到天天文库
浏览记录
ID:35342332
大小:112.44 KB
页数:5页
时间:2019-03-23
《实验四文本及目录相关命令的使用(一)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实验四文本及目录相关命令的使用(一)上机实验内容:一、简答部分1.简述PATH变量的作用环境变量PATH的作用是提供给用户查找文件的可能路径;当新安装了套件时,可能需要将可执行文件的路径写入环境变量.二、操作部分1.绝对相对路径1)用绝对路径执行Is指令[roottatocalhost~]#Is/home/user公共的模板视頻困片文档下载音乐桌面2)把当前操作目录切换到root的家目录,使用相对路径执行Is指令[root(aiocalhost[root@localhostanaconda・ks.cfginstalI.log[root(aiocalhost~]#cd-rootT#Is
2、./install.log.syslog公共的T#
3、摸板视頻片下载桌面文档音乐2.PATH变量1)查看当前用户的PATH变量[root@localhost~]#echo$PATH/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin2)把路径/tmp/test加入到PATH变量中[root@localhost~]#PATH=-$PATHM:/tmp/test[root@localhost~j#
4、3.目录操作:1)用命令列出根目录下的目录及文件;[root@
5、localhost~]#Is-A-a•.config.gnoteinstall.log•■.cshrc.gnupginstall.log.sysloganaconda-ks.cfg.dbus.gstreamer-0.10•local.bashlogout.esdauth.gtk-bookmarks.nautilus.bashprofile.gconf.gvfs.pulse.bashrc.gconfd.ICEauthority.pulse・cookie.cache.gnome2.imsettings.log•recently・used.xbeledhshcsh共板频片.r.s.t公模视
6、s档载乐面文下音桌2)用一条命令创建目录/root/tcst/x/y/z;[roottatocalhost~]#mkdir・p/root/test/x/y/z[roottatocalhost~j#
7、3)查看当前目录下的所有文件,要求显示其详细信息;[root@localhost~]#Is-la总用星228dr-xr-x.26rootroot409610月90015.dr・xr-xr・x.26rootroot4096月823520B・rw.1rootroot25789月140049anaconda・ks.cfg・r--r--.1rootroot185月202009bashlogout-
8、rw・1rootroot1765月202009bashprofile1rootroot1769月232004bashrcdrwxr・xr・x.3rootroot409610月82354.cachedrwxr・xr・x.5rootroot40969月140105.config-rw-r--r•・•1rootroot1009月232004cshrcdrwx•3rootroot40969月140105.dbus・rw•1rootroot169月140105・esdauthdrwx•4rootroot4096月82354.gconfdrwx2rootroot4096月90014.gconfd
9、drwx5rootroot40969月140105.gnome2drwxr・xr・x.3rootroot40969月140105.gnotedrwx2rootroot4096月82354.gnupgdrwxr-xr・x.2rootroot40969月140105.gstreamer-6.10・rw-r1rootroot16010月82354.gtk-bookmarksdr-x•2rootroot010月82354.gvfs[-rw1rootroot62010月82354.ICEauthority-rw•1rootroot77810月82354.imsettings.log-rw・1r
10、ootroot605179月140049install.log-rw-1rootroot145619月140046install.log.syslogdrwxr・xr・x.3rootroot40969月140105.localdrwxr・xr・x.2rootroot40969月140105.nautilusdrwx•2rootroot40969月140105.pulse・rw•1rootroot2569月140105.pulse・cookie・rw•1ro
此文档下载收益归作者所有