업로드된 PDF 참고.
저작권은 모두 jtjisgod 에게 있습니다.
상업적으로 사용하지 않으면, 출처를 쓰시고 어디에나 인용하시거나 가져다 쓰셔도 됩니다.
+ 친구들에게 알려주기 위해 작성한 PDF이므로 일부 반말이 섞여있으며, 해당 PDF로만 봐서 이해 할 수 없는 내용이 있을 수 있습니다.
2. 공부 방법
1. 일단 강의를 듣습니다.
( 필기 하던가 말던가 )
2. 일주일에 한번 씩 시험을 봅니다.
( 그냥 설명하는 것에 대한 명령어 쓰기 )
3. 어느 정도 주입이 끝났다고 생각되면, 자격증 시험지를 품
( 2주에 한 번 하다가, 시험 3주 전부턴 일주일에 한번, 시험 1주전엔 하루에 한번)
4. Good Luck
3. cat, cd, chmod, chown,
clear, cp, date, df, du, file,
find, grep, kill, less, ln,
locate, lpr, ls, man, mkdir,
mv, passwd, ps, pwd, rm,
rmdir, ssh, su, tail, tar,
top, touch, who
오늘 배울 명령어
4. cat [filename]
= catenate 사슬로 잇다, 연결하다; 암기하다
Display file’s contents to the standard output device (usually your monitor).
→ 파일의 내용을 표준 출력으로 보여줍니다. ( 보통 모니터로 보입니다. )
6. chmod [options] [mode] [filename]
= change mode 파일의 권한 설정을 바꾸어라.
[options] = -r 등등 … 옵션에 관련된 심화된 내용은 나중에 공부
[mode] = 000, 744, 777 등 권한을 숫자로 표현한 내용, 뒷 페이지에서 공부
[filename] = 파일 또는 디렉토리 이름을 넣음
[filename]에 대한 권한이 [mode]으로 변합니다.
7. chmod [options] [mode] [filename]
= change mode 파일의 권한 설정을 바꾸어라.
777 → rwx, rwx, rwx
744 → rwx, r - -, r - -
222 → www, - - -, - - -
그렇다면 753은?
8. chown [options] [owner] [filename]
= change owner 파일 또는 디렉터리의 소유자 변경
[options] 는 나중에 …
chown jtjisgod ./text.txt
./text.txt 라는 파일의 소유주가 jtjisgod이라는 유저로 바뀐다.
14. find [pathname] [expression]
= find 파일을 찾아라~~~~~~~~
[pathname] 폴더의 자식에서
[expression]에 맞게 찾아라
[expression]은 size나 name등 “표현”을 의미한다
Find ./ -name jtjisgod.txt
→ 현재 폴더 ( ./ ) 에서 “jtjisgod.txt”라는 이름을 찾아라. ( 폴더나 파일 이름 모두 )
15. grep [options] pattern [filesname]
= global regular
expression print
[option] 은 나중에 …
나는 특히 “ -r “ 명령어를 많이 씀.
[pattern]은 어떤걸 검색하냐고 물어봄
[filename] 은 파일 명을 의미 하는 거야. 안써도 되고..
“grep -r jtj” 라고 하면 현재 폴더 아래에 있는 모든 파일들 내용에서 “jtj”를 찾아
“grep -r jtj ./file.txt” 라고 하면 “./file.txt”에서 “jtj”를 찾아
전체적인 텍스트를
검색해서 출력한다.
16. grep [options] pattern [filesname]
= global regular
expression print
전체적인 텍스트를
검색해서 출력한다.
17. grep [options] pattern [filesname]
= global regular
expression print
전체적인 텍스트를
검색해서 출력한다.
18. kill [options] [pid]
= kill [pid]를 죽여!!!!!!
[pid] = process id = 실행되고 있는 프로세스 ( 프로그램 ) 의 고유한 아이디
kill 1023
→ 1023 이라는 프로세스 아이디를 갖고 있는 프로그램을 죽여라!!
19. killall [options] [process name]
= killall [process name]을 죽여라
Process name = 실행되고 있는 프로세스의 이름
( python3 라던가,, chrome 이라던가.. )
killall chrome
→ 모든 chrome 모두 죽이기
20. ln [options] [source] [destination]
= link n...(몰라) 바로 가기를 만들기 위해 사용
바로 가기를 위해 사용하는데
[options]는 주로 “-s” 를 사용함.
폴더와 파일 모두 사용가능
ln -s /var/www/html ~/바탕화면/html
/var/www/html 이란 폴더의 바로가기를 바탕화면에 있는 html폴더로 해라.
( ~/바탕화면/html 에서 작업하는 것은 /var/www/html 에서 작업하는 것과 같음)
27. rmdir [options] [directory]
= remove directory 디렉토리를 삭제하거라.....
그냥 폴더를 삭제해요.
안에 뭐 있으면 삭제 안해요.
근데 옵션에 따라 삭제 할 수 도 있을 것 같아요.
28. 배운 명령어
cat [filename] Display file’s contents to the standard output device (usually your monitor).
cd /directorypath Change to directory.
chmod [options] mode filename Change a file’s permissions.
chown [options] filename Change who owns a file.
clear Clear a command line screen/window for a fresh start.
cp [options] source destination Copy files and directories.
date [options] Display or set the system date and time.
file [options] filename Determine what type of data is within a file.
find [pathname] [expression] Search for files matching a provided pattern.
grep [options] pattern [filesname] Search files or output for a particular pattern.
kill [options] pid Stop a process. If the process refuses to stop, use kill -9 pid.
ln [options] source [destination] Create a shortcut.
ls [options] List directory contents.
mv [options] source destination Rename or move file(s) or directories.
man [command] Display the help information for the specified command.
mkdir [options] directory Create a new directory.
rm [options] directory Remove (delete) file(s) and/or directories.
rmdir [options] directory Delete empty directories.
29. 생각 해 볼 문제
cat, cd, chmod, chown,
clear, cp, date, file, find,
grep, kill, ln, ls, mv,
man, mkdir, rm, rmdir
30. 생각 해 볼 문제
cat, cd, chmod, chown,
clear, cp, date, file, find,
grep, kill, ln, ls, mv,
man, mkdir, rm, rmdir