zoukankan      html  css  js  c++  java
  • Linux之温故知新1

    1.touch命令的使用

    2.使用(cd -)可以在上次使用的目录来回切换

    3.ls通配符的使用*代表任意字符和任意个字符, ?代表任意一个字符, [12345]中的任意一个字符, [1-5]中的任意一个字符.

     1 linxmouse@ubuntu:~/Desktop$ touch 123
     2 linxmouse@ubuntu:~/Desktop$ touch 223
     3 linxmouse@ubuntu:~/Desktop$ touch 323
     4 linxmouse@ubuntu:~/Desktop$ touch 423
     5 linxmouse@ubuntu:~/Desktop$ touch 523
     6 linxmouse@ubuntu:~/Desktop$ ls *3
     7 123  223  323  423  523
     8 linxmouse@ubuntu:~/Desktop$ ls ?3
     9 ls: cannot access '?3': No such file or directory
    10 linxmouse@ubuntu:~/Desktop$ ls ?23
    11 123  223  323  423  523
    12 linxmouse@ubuntu:~/Desktop$ ls 2?3
    13 223
    14 linxmouse@ubuntu:~/Desktop$ ls [125]23
    15 123  223  523
    16 linxmouse@ubuntu:~/Desktop$ ls []23
    17 ls: cannot access '[]23': No such file or directory
    18 linxmouse@ubuntu:~/Desktop$ ls [1]3
    19 ls: cannot access '[1]3': No such file or directory
    20 linxmouse@ubuntu:~/Desktop$ ls [1-2]3
    21 ls: cannot access '[1-2]3': No such file or directory
    22 linxmouse@ubuntu:~/Desktop$ ls [1-2]23
    23 123  223

     4.ls的-h, 

    -h, --human-readable
    with -l and/or -s, print human readable sizes (e.g., 1K 234M 2G)

     1 linxmouse@ubuntu:~$ ls -lh
     2 total 36K
     3 drwxr-xr-x 2 linxmouse linxmouse 4.0K Oct 15 09:53 Desktop
     4 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Documents
     5 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Downloads
     6 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Music
     7 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Pictures
     8 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Public
     9 drwxrwxr-x 3 linxmouse linxmouse 4.0K Oct 15 06:47 temp
    10 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep 21 19:20 Templates
    11 drwxr-xr-x 2 linxmouse linxmouse 4.0K Sep  3 06:51 Videos
  • 相关阅读:
    [LeetCode][JavaScript]Copy List with Random Pointer
    [LeetCode][JavaScript]Best Time to Buy and Sell Stock II
    [LeetCode][JavaScript]Best Time to Buy and Sell Stock
    [LeetCode][JavaScript]Populating Next Right Pointers in Each Node
    [LeetCode][JavaScript]Text Justification
    [LeetCode][JavaScript]LRU Cache
    用CRTP在C++中实现静态函数的多态
    C++的静态分发(CRTP)和动态分发(虚函数多态)的比较
    用Y分钟学会X
    看看你能认出多少种编程语言
  • 原文地址:https://www.cnblogs.com/linxmouse/p/9826561.html
Copyright © 2011-2022 走看看