zoukankan      html  css  js  c++  java
  • Command Line

    pwd
    outputs the name of the current working directory.

    ls
    lists all files and directories in the working directory.

    cd
    switches you into the directory you specify.

    mkdir
    creates a new directory in the working directory.

    touch
    creates a new file inside the working directory.


    cp
    The cp command copies files or directories.
    cp file1.txt file2.txt
    cp sourcedir/chifile.txt targetdir/
    cp sourcedir1/file1.txt sourcedir2/file2.txt targetdir/
    cp * satire/ # copy all files in the working directory into the satire/ directory.
    cp m*.txt scifi/ #copy all files in the working directory starting with "m" and ending with ".txt" into the satire/ directory.

    mv
    用法同cp, 但可用 mv file1.txt file2.txt 重命名

    rm
    rm file.txt
    rm -r dir

    rename

    rename a b

     

    The -a modifies the behavior of the ls command to also list the files and directories starting with a dot (.). Files started with a dot are hidden, and don't appear when using ls alone.
    ls -a
    lists all contents of a directory, including hidden files and directories
    ls -l
    lists all contents in long format
    ls -t
    orders files and directories by the time they were last modified

    Multiple options can be used together, like ls -alt

     

     

     

    2015-07-18

  • 相关阅读:
    HDU5367 思维map // 动态线段树
    CF500C New Year Book Reading
    窗口的星星
    【模板】扫描线
    [JLOI2014]松鼠的新家
    [USACO15DEC]最大流Max Flow
    The Lost House
    介绍 Seq2Seq 模型
    word2vec 和 glove 模型的区别
    关于 word2vec 如何工作的问题
  • 原文地址:https://www.cnblogs.com/whuyt/p/4657807.html
Copyright © 2011-2022 走看看