[ TIL ] Operating System | Navigating Directories

charco·2021년 9월 22일
0

나도TIL

목록 보기
19/55
post-thumbnail

Linux Directories Under Root Directory

  • bin -> similar to C:\Program Files directory in Windows
    commands like ls is in this directory.

  • etc -> stores important system configuration files

  • home -> personal directory for users
    similar to C:\Users directory.

  • proc -> stores information about currently running processes.

  • var -> stores system logs and files that constantly changes

Flags

Every Commands has flags.
Use --help to see flags.
Use man to see manual.

Display Files

Less

less 경로/파일네임
up and down -> scroll
g -> beginning
G -> end
/{word} -> search
q -> quit

show first 10 lines

tail

show last 10 lines

Text Editors

Nano, Vim, Emacs

Search in Files

grep {word} {file}

Pipeline

use | to use multiple commands
ex ) ls -la ./ | grep helloworld

Redirector Operator

  • 1 -> stdout
    [standard output] > [file.txt]
  • 2 -> stderr
    [error message] 2> [error.txt]
profile
아직 배우는 중입니다

0개의 댓글