zoukankan      html  css  js  c++  java
  • 008_file manage

    1. cp : copy files and directories
        1.1 Basic use of cp  :   cp SRC DEST
            SRC is a single file:
                If DEST does not exist :create DEST and copy the content of SRC to DEST;
                If DEST exists:
                    If DEST is a file :overwrite DEST , and -i option is recommanded;
                    If DEST is a directory :Create a file named SRC in the directory of DEST,and fill the new file with the content of source SRC;
            SRC are multiple files:
                DEST must exist and is a directory
            If SRC is a directory :-r option is recommanded.
                If DEST does not exist :Create a directory named DEST and copy all of the files in SRC to DEST.
                If DEST exists :
                    If DEST is a file :An error is reported.
                    If DEST is a directory:copy all of the files in SRC to DEST.
        1.2 Commondly used options
            -i:interactive
                -r, -R: recursion
            -a: 归档,相当于-dR --preserv=all

                 The original state and attributes of copied files are not always saved,for example ,if you copy a symlink file,it actually copies not the symlink file itself,but create a file with the same name as the symlink file and then fill the new file with the content of the file linked by the symlink file.  -a is used to resolve this problem.    

            -p: --preserv=mode,ownership,timestamp
            -v: --verbose
                -f: --force
    2. mv : move (rename) files
        2.1 The same basic use as cp
        2.2 Commondly used options
            -i: interactive
                   -f: forced
    3. rm : remove files or directories
        3.1 Basic use of rm:rm [OPTION]... FILE...
        3.2 Commondly used options
            -i: interactive
                -f: forced
                -r: recursion
                rm -rf   

  • 相关阅读:
    SD卡的控制方法(指令集和控制时序)
    MDK的优化应用(转)
    SD卡的SPI模式的初始化顺序(转)
    SD卡读写扇区注意事项(转)
    MDK下调试时提示AXF文件无法导入的解决方法(转)
    把一个 int 数字 n 格式化成16进制的字符串(前面补零成0位)
    DB9 公头母头引脚定义及连接、封装
    RS232 DB9 公头 母头 串口引脚定义
    Codeforces 91C Ski Base 加边求欧拉回路数量
    Cocos Code IDE + Lua初次使用FastTiledMap的坑
  • 原文地址:https://www.cnblogs.com/liujun5319/p/9600853.html
Copyright © 2011-2022 走看看