Zsh CLI 가이드

42의 명령어를 찾았습니다

cd
navigation
디렉토리 변경

사용법:

$ cd /path/to/directory cd .. cd ~
directory
change
move
ls
file
디렉토리 내용 나열

사용법:

$ ls ls -la ls -lh
list
directory
files
pwd
navigation
현재 작업 디렉토리 경로 출력

사용법:

$ pwd pwd -P
path
directory
current
mkdir
directory
새 디렉토리 생성

사용법:

$ mkdir new_directory mkdir -p path/to/new/directory
create
directory
make
rmdir
directory
빈 디렉토리 삭제

사용법:

$ rmdir empty_directory rmdir -p path/to/empty/directory
remove
directory
delete
cp
file
파일/디렉토리 복사

사용법:

$ cp source destination cp -r directory destination
copy
file
directory
mv
file
파일/디렉토리 이동 또는 이름 변경

사용법:

$ mv source destination mv old_name new_name
move
rename
file
rm
file
파일/디렉토리 삭제

사용법:

$ rm file rm -r directory rm -f file
remove
delete
file
touch
file
빈 파일 생성 또는 타임스탬프 업데이트

사용법:

$ touch new_file touch -t 202401010000 file
create
file
timestamp
cat
text
파일 내용 출력

사용법:

$ cat file cat file1 file2 > combined
view
file
content
less
text
파일 내용 페이지 단위로 보기

사용법:

$ less file less -N file
view
pager
file
head
text
파일의 처음 부분 출력

사용법:

$ head file head -n 10 file
view
beginning
file
tail
text
파일의 마지막 부분 출력

사용법:

$ tail file tail -f file tail -n 20 file
view
end
file
grep
text
텍스트 검색

사용법:

$ grep pattern file grep -r pattern directory
search
pattern
text
find
search
파일/디렉토리 검색

사용법:

$ find . -name '*.txt' find . -type f -mtime -7
search
file
directory
chmod
permissions
파일 권한 변경

사용법:

$ chmod 755 file chmod u+x file
permissions
mode
file
chown
permissions
파일 소유자 변경

사용법:

$ chown user:group file chown -R user:group directory
owner
group
file
ps
process
프로세스 상태 표시

사용법:

$ ps ps aux ps -ef
process
status
system
kill
process
프로세스 종료

사용법:

$ kill pid kill -9 pid killall process_name
process
terminate
signal
top
process
시스템 프로세스 모니터링

사용법:

$ top top -u username
monitor
process
system
df
system
디스크 사용량 표시

사용법:

$ df df -h df -i
disk
space
usage
du
system
디렉토리/파일 사용량 표시

사용법:

$ du directory du -sh directory du -h --max-depth=1
disk
usage
size
tar
archive
파일 압축/해제

사용법:

$ tar -czf archive.tar.gz files tar -xzf archive.tar.gz
archive
compress
extract
gzip
archive
파일 압축

사용법:

$ gzip file gzip -d file.gz
compress
decompress
file
history
shell
명령어 히스토리 표시

사용법:

$ history history 10 !n
history
command
shell
alias
shell
명령어 별칭 설정

사용법:

$ alias ll='ls -l' alias -p
alias
shortcut
shell
export
shell
환경 변수 설정

사용법:

$ export VAR=value export -p
environment
variable
shell
source
shell
스크립트 실행

사용법:

$ source script.sh . script.sh
script
execute
shell
echo
text
텍스트 출력

사용법:

$ echo 'Hello, World!' echo $PATH
output
print
text
printf
text
포맷된 텍스트 출력

사용법:

$ printf '%s ' 'Hello, World!' printf '%d' 42
format
output
text
read
input
사용자 입력 읽기

사용법:

$ read variable read -p 'Enter name: ' name
input
read
user
test
shell
조건 테스트

사용법:

$ test -f file [ -d directory ]
test
condition
shell
if
shell
조건문

사용법:

$ if [ condition ]; then commands fi
condition
control
shell
for
shell
반복문

사용법:

$ for i in {1..5}; do echo $i done
loop
iteration
shell
while
shell
조건 반복문

사용법:

$ while [ condition ]; do commands done
loop
condition
shell
case
shell
다중 조건문

사용법:

$ case $var in pattern1) commands ;; pattern2) commands ;; esac
condition
switch
shell
function
shell
함수 정의

사용법:

$ function name() { commands }
function
define
shell
ln
file
심볼릭 링크 생성

사용법:

$ ln -s target link ln -sf target link
link
symbolic
file
sort
text
텍스트 정렬

사용법:

$ sort file sort -r file sort -n file
sort
order
text
uniq
text
중복 줄 제거

사용법:

$ uniq file sort file | uniq
unique
duplicate
text
wc
text
줄, 단어, 문자 수 계산

사용법:

$ wc file wc -l file wc -w file
count
lines
words
diff
text
파일 비교

사용법:

$ diff file1 file2 diff -u file1 file2
compare
difference
file