Linux#コマンドメモ1


#pwd
show your directory

#clear
clear the terminal

#drwxr?
- d:directory
- r:read
- w:write
- x:execute
- r:read

#ls
list all the things in the directory

- ls /usr/
    -  list the things inside usr directory![sample1.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/d4960774-9aaf-7265-616f-79c5d9c0082b.gif)

-  ls ..
    -  list out a back directory![sample2.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/82a8232a-38be-ddaf-c2d1-09e9ee93d2c5.gif)

-  ls -l
    -  display in long format![sample3.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/25b6b1a8-6373-d6ec-e083-2bb360cadf04.gif)

-  ls -a
    -  show the hidden things also ![sample4.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/9ab34506-c76c-ff7b-270c-552fc0424588.gif)

-  ls -la
    -  list in long format and show the hidden things also![sample5.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/2ce20647-ca7e-de38-96a5-6915efcbac44.gif)

-  ls -lS
    -  list the item and sort by Size![sample6.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/d81c4355-2af4-3093-aadb-8b05867b562c.gif)

-  ls -l *txt
    -  list the item with .txt only![sample7.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/2f751cab-671c-e853-8bf1-b2509de4c125.gif)

-  ls -lS >path
    -  list the item and sort by Size and output the result to file as path.![sample11.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/a4ea516a-b224-bdce-5443-437fcb67d6ea.gif)

-  ls -d */
    -  list all directory![sample12.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/5c10c077-669d-3373-ae52-1c861ce75a0f.gif)

-  man ls
    -  got the manual of ls

#cd
Change directory

- cd ~
    - go back to home directory
- cd ..
    - go back one directory
- cd /your path
    - go to directory that you want to

#cat

- cat
    - enter somethings and it will echo back![sample3.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/0260b910-7b35-75fd-4c17-ef512b80dd96.gif) Ctrl+D to End
- cat yourpath.files
    - show the file![sample4.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/1fc18023-a6e3-9e05-2b53-84244a8692a7.gif)
- cat yourfile1 yourfile![sample9.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/a0bcd4fb-be51-9c44-62d6-8f7d83f87fc0.gif)

    - show the files![sample5.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/926a6b30-e4cd-d013-7d8c-2231b3dfa7a0.gif)
- cat -b yourfile
    - show and add the line numbers on the non-blank line![sample6.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/a234c5ca-87d6-56d9-98b7-123332b949dc.gif)
- cat -n yourfile
    - show and add the line numbers on all the lines.![sample7.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/87ead07a-e536-3372-8b18-ac59eba99f0a.gif)
- cat -s yourfile
    - show your files and decrease all the blank line to one line![sample8.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/b6eba782-9dac-b2c2-e7ed-b347b03ce4e3.gif)
- cat -E yourfile
    - show your files and add $ symobl on each of end line.!![22.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/154661/ff111b89-a353-4c89-d5a3-3f866d58ffe3.gif)