zoukankan      html  css  js  c++  java
  • Shell

    The shell is a command-line interface for running programs.

    Also, the vast majority of web servers in the wild run on the linux and the shell is a vital tool for development.

    ls  =  list the directory

    ls -l  =  detailed info

    ls -l Documents/*.pdf =show the detailed file which end as .pdf

    ls -l Documents/ =  show the long detailed info

    pwd  =  现在所属的文件夹位置

    cd =  进入

    cd. . =  父级

    ls~ = home directory

    mkdir =  make a new directory

    mkdir Documents/Books

    mv 'Documents/*1984.epub'  Documents/Books/

    mv Documents/*.epub  Documents/Books/ ==All the .epub file move to the other address

     

    man +order = check the meaning of order

    curl =C URL=see URL~explaining the joke

    curl 'http://google.com'

    curl -L 'http://google.com'

    curl is good at downloading the file.

    curl -o google.html -L  'http://google.com'

    Enter a shell command to download https://tinyurl.com/zeyq9vc and save it as the file dictionary.txt. Remember to use the option to follow web redirects.

    curl -L -o dictionary.txt  'http://tinyurl.com/zeyq9vc'

    cat = read the file and output the content = catenate =concatenate=run serval thing together

    cat dictionary.txt

     less =less file

    rm=remove

    rm -i

    rmdir errorDirectory

    grep shell dictionary.txt

    grep shell dictionary.txt | less

    curl -L https://tinyurl.com/zeyq9vc | grep fish

    curl -L https://tinyurl.com/zeyq9vc | grep fish | wc -L

    shell has two variabless.

    numbers='one two three'

    echo $number

    One is internal to the shell program itself.

    echo $LINES*$COLUMNS

    The other kind is called an environment variable.

    echo $PATH

    Environment variables are shared with programs that you run from within the shell.

    One environment variable that is really important is the Path variable. That tells your system where your program Files are.

    bash_profile

    man bash

    alias

    alias ll='ls -la'

  • 相关阅读:
    ES 内存深度解析
    Spring Cache介绍和使用
    mysql 索引及索引创建原则
    mysql中四种存储引擎的区别和选择
    Java中数组、List、Set互相转换
    COGS 1151 活动安排
    洛谷P1650赛马与codevs 2181 田忌赛马
    5月3日济南清北学堂随堂测试题目
    codevs 1206 保留两位小数
    codevs 1203 判断浮点数是否相等
  • 原文地址:https://www.cnblogs.com/gzoof/p/7216202.html
Copyright © 2011-2022 走看看