taenyLog
맨(Man)페이지와 플래그 / 터치(touch) 명령-파일생성 / 파일 및 폴더 제거 (rm/rmdir) 본문
플래그 flag
ls에 붙일수 있는 플래그 들
-o, -p, -r , -l 등등.
https://linux.die.net/man/1/ls
ls(1): directory contents - Linux man page
ls(1) - Linux man page Name ls - list directory contents Synopsis ls [OPTION]... [FILE]... Description List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort. Mandatory arguments to
linux.die.net
-l use a long listing format
-a, --all do not ignore entries starting with .
-m fill width with a comma separated list of entries
-v natural sort of (version) numbers within text
파일생성 명령어
touch
1. 파일생성
2. 파일의 수정시간과 접근 시간 변경
3. 파일이 없으면 디폴트 권한을 가진 새로운 파일 생성
https://linux.die.net/man/1/touch
touch(1): change file timestamps - Linux man page
touch(1) - Linux man page Name touch - change file timestamps Synopsis touch [OPTION]... FILE... Description Update the access and modification times of each FILE to the current time. A FILE argument that does not exist is created empty, unless -c or -h is
linux.die.net
touch purple.txt
purple.txt의 파일이 생성된다.
txt, png, pdf 같은 확장자 입력하면 해당 파일 생성
+)
newProject 안에 html 파일와 css 파일 생성하기
파일 및 폴더 제거
파일제거
rm 파일이 바로 제거됨
폴더제거
rmdir 빈폴더만 제거 가능
rm -r -f 비어있지 않은 디렉터리 삭제시 사용. 중첩디렉토리가 여러개 있어도 한번에 삭제 가능
-r : 반복(중첩된 폴더 모두 삭제)
-f : 강행(삭제하겠냐고 다시 묻지않고 곧바로 작업 수행)
https://linux.die.net/man/1/rm
rm(1): remove files/directories - Linux man page
rm(1) - Linux man page Name rm - remove files or directories Synopsis rm [OPTION]... FILE... Description This manual page documents the GNU version of rm. rm removes each specified file. By default, it does not remove directories. If the -I or --interactiv
linux.die.net
'Web' 카테고리의 다른 글
Node Js | Module / NPM (0) | 2023.06.21 |
---|---|
Node JS (0) | 2023.06.21 |
Terminal | 디렉터리 생성 mkdir (0) | 2023.06.20 |
Terminal | 절대경로와 상대경로 (0) | 2023.06.20 |
Terminal | ls, pwd, cd (0) | 2023.06.20 |