ls
(list)ls
: 현재 디렉터리ls -a
: 숨김 파일까지 표시ls -l
: 상세 정보 표시ls *.cfg
: 확장자별 목록 표시cd
(change directory)디렉터리 이동
cd
: 홈 디렉터리로 이동
cd ..
: 상위 디렉터리로 이동
cd /etc/sysconfig
: 절대 경로 이동
cd ../etc/sysconfig
: 상대 경로 이동
.
= 현재 디렉터리, ..
= 상위 디렉터리
pwd
(print working directory)pwd
rm
(remove)rm abc.txt
: 파일 삭제rm -i abc.txt
: 삭제 시 확인rm -f abc.txt
: 강제 삭제rm -r abc
: 디렉터리 삭제rm -rf abc
: 디렉터리 + 하위 전부 강제 삭제cp
(copy)cp a.txt b.txt
: 파일 복사cp -r abc def
: 디렉터리 복사touch
touch abc.txt
mv
(move)mv abc.txt /etc/sysconfig/
: 이동mv abc.txt www.txt
: 이름 변경mkdir
(make directory)mkdir abc
mkdir -p /def/fgh
: 부모 디렉터리까지 생성rmdir
(remove directory)rmdir abc
cat
(concatenate)cat a.txt
head
/ tail
head a.txt
: 앞 10줄head -3 a.txt
: 앞 3줄tail -5 a.txt
: 뒤 5줄more
more a.txt
more +30 a.txt
: 30행부터 출력less
more
확장판 (화살표, PageUp/Down 지원)less a.txt
less +30 a.txt
: 30행부터 출력file
file a.txt
: ASCII textfile /dev/sr0
: 장치 파일clear
clear