0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Linux#コマンドメモ1

Posted at

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 directorysample1.gif
  • ls ..

    • list out a back directorysample2.gif
  • ls -l

    • display in long formatsample3.gif
  • ls -a

    • show the hidden things also sample4.gif
  • ls -la

    • list in long format and show the hidden things alsosample5.gif
  • ls -lS

    • list the item and sort by Sizesample6.gif
  • ls -l *txt

    • list the item with .txt onlysample7.gif
  • ls -lS >path

    • list the item and sort by Size and output the result to file as path.sample11.gif
  • ls -d */

    • list all directorysample12.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 backsample3.gif Ctrl+D to End
  • cat yourpath.files

    • show the filesample4.gif
  • cat yourfile1 yourfilesample9.gif

    • show the filessample5.gif
  • cat -b yourfile

    • show and add the line numbers on the non-blank linesample6.gif
  • cat -n yourfile

    • show and add the line numbers on all the lines.sample7.gif
  • cat -s yourfile

    • show your files and decrease all the blank line to one linesample8.gif
  • cat -E yourfile

    • show your files and add $ symobl on each of end line.!22.gif
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?