rche033 unit3-----------browsing the filesystem

unit3-----------browsing the filesystem
Kernel
系统内核用于在计算机启动时载入基本内存、 管理基本输入输出、管理进程初始化和进程的调度。
Shell 
系统的命令解释器,用于操作系统与用户的通信,相当于Dos中的command.com。Red Hat Linux 默认的shell 是Bash !
Shell与系统及子进程的层次关系
/bin:存储常用用户指令。
/boot:存储核心、模块映像等启动用文件
/dev:存储设备文件
/etc:存储系统、服务的配置目录与文件
/home:存放个人主目录
/lib:存放库文件,诸如核心模块、驱动
/lost+found:存储fsck用的孤儿文件
/mnt:系统加载文件系统时用的常用挂载点
/opt:第三方工具使用的安装目录
/proc:虚拟文件系统,包含系统讯息等资料
/root:root用户的主目录
/sbin:存储系统管理用指令
/tmp:临时文件的暂存点
/usr:存放与用户直接相关的文件与目录
/var:存储在系统运行中可能会更改的数据
-----------------------------------------------------
cp:cp -r  doc jpg   复制目录   修改时间为当前时间
   cp -a                       最后一次修改的时间
  
cp -p 2009 doc===============保留源文件的时间戳
cp -a doc jpg   ===============最后一次被修改的时间
cp file1 file2 dest=====将多个文件拷贝到目标目录
-a = -p -r

moving and renaming files and directories
要点:
====if the destination exists and is a directory ,the source file or directory is moved there with the same name
====if the destination eixsts and is a file,the source file is moved to that filename,overwriting the file
=====if the destination does not exist,the source file or directory is renamed with that name

mv [option] file destination
mv [options] file1 file2 destination
重命名:mv file1 file2
        mv doc/cisco0 jpg/cisco3======cisco0重命名为cisco3
       
       
       
       
       
       creating and removing files
      
       ====rm     -remove files
       要点:
      
        rm[options] filenames
       
        =====-i 删除之前有提示
        =====-r 删除目录,空目录可用rmdir
        =====-f 强制
        使用这种方式删除以后,就不可能恢复过来了
       
       
       
 
 
       
        less doc/cisco1.txt      v进入编辑模式   insert 写入文字模式 
        b:回到上一页
       空白键:下一页
       ctrl+d:向下半页
       ctrl+u:向上半页
       g:最上面
       G:最下面
       /less

本文出自 “www.51cto.com” 博客,谢绝转载!

你可能感兴趣的:(linux,cp,mv,rm,rche,033)