#Programming Language/Linux

How to use the Linux extended command. 1.grep command.==> 문자열 패턴으로 하나 또는 이상의 파일들에 내용을 검색.==> 패턴에 포함된 모든 줄을 화면으로 출력하며, 파일 내용을 바꾸지 못한다. 2.How to use the grep command.==> grep option pattern file_name grep -i root /etc/group # grep -i Root /etc/group root: x: 0: # * 대소문자 구분 없이 root를 검색. grep -I root /etc/group # grep -l root /etc/group /etc/group # * root가 있는지 없는지 표시 grep -I root group passwd hosts..
Linux Manual Show Special Value Settings. Cf). 무조건 알아야 된다고는 말 못하는 글이다. ==> 시간이 없다면 이 글은 넘어가도 된다. 1.Manual ==>Linux에서는 명령어에 대한 메뉴얼이 존재한다. 명령어를 어떤 식으로 사용할 지 모를 때는==>메뉴얼을 보면 이해하기 쉽다. 2.View manual # man command # man ls # man vi # man shadow (파일 매뉴얼) # man 5 shadow (Section no. 사용) Section 1 : 명령어 매뉴얼 Section 2~3 : 프로그램 관련 매뉴얼 Section 4~5 : 파일 소개 및 설정 매뉴얼 Cf) #man ls ==>위 화면을 보다시피 정말 자세히 되어있어서 처음에는..
The Linux vi editor. 1.Vi editor. ==> vi editor는 리눅스를 비롯한 유닉스 계열 운영 체제에서도 많이 사용하는 텍스트 파일 편집 프로그램.2.The operating mode of the linux vi editor.==>vi 편집기는 기본적으로 3가지의 기본 운영 모드를 가지고 있다.==>명령어, 편집, 마지막 줄 모드. 3.Command mode. ==> 명령어 모드는 vi 편집기에 기본 모드. 글자를 지우고, 바꾸고, 복사하고 이동할 수 있다.==> 또한 커서의 위치, 문자열 검색, vi 편집기를 빠져나가는 작업을 한다. 4.Edit mode. ==> 편집 모드는 사용자가 실제로 키보드로 입력한 텍스트가 파일로 들어간다.==> i - 커서 앞에 텍스트 입력.==>..
Linux directory, file copy, delete. 1.#cp==> 원본 파일을 다른 파이롤 복사할 경우 사용할 멸령어. # cd dir # ls # cat data1 one two three four five # cp data1 data2 # ls # cat data2 one two three four five # cd .. # ls dir data1 data2 # cp -r dir dir2 # ls dir2 data1 data2 2.#rmdir ==> 빈 디렉터리를 삭제할 때 사용하는 명령어. # mkdir file # ls -l file 합계 0 # rmdir file # ls -l file ls: cannot access file: 그런 파일이나 디렉터리가 없습니다. 3.#rm ==>..
Linux directory, move and replace files. 1.#mv==> 디렉터리나 파일을 이동하거나 이름을 바꿀 때 사용하는 명령어. # mv data1 /root/dir # ls dir data1 # touch apple # ls apple ... # mv apple banana # ls banana ...
Linux directory, file creation. 1.#mkdir==> 디렉터리를 생성할 때 사용하는 명령어. #mkdir dir #ls -ld dir drwxr-xr-x. 2 root root 4096 2016-12-01 13:52 dir 2.#touch==> 빈 파일을 생성하거나 최종 수정 시간을 변경할 때 사용하는 명령어. # touch aaa # ls -ld aaa -rw-r--r--. 1 root root 0 2016-12-01 14:02 aaa # touch aaa # ls -ld aaa -rw-r--r--. 1 root root 0 2016-12-01 14:03 aaa 3.#cat > 파일명.==> 파일을 생성하면서 데이터를 입력할 때 사용하는 명령어. # cat > data1 one..
Commands related to Linux files. 1.#cat.==> 텍스트 파일의 내용을 화면에 출력하는 명령어.#cat test.txthello linux. 2.#more.==>긴 텍스트 파일의 내용을 한 화면씩 보여주는 명령어. # more install.log libgcc-4.4.7-4.el6.x86_64 설치 warning: libgcc-4.47-4.el6.x86_64: Header V3 RSA/SHA1 Signature, key... ... --More--(2%) 3.#head==>기본적으로 파일의 처음부터 10줄을 보여준다.-n 옵션으로 보여지는 줄의 수를 바꿀 수 있다.-n 옵션은 파일의 시작 부분에서 시작해 n줄까지 내용을 보여준다. # head install.log libgcc..
Commands related to Linux directory. 이미 이전 글들에서 직,간접적으로 쓴 내용이지만, 중요하다고 생각해서 또 언급하겠다. 1.#pwd==> 현재 작업하는 디렉터리의 위치를 확인하는 명령어.==> #pwd ==> /root 2.#ls==> 현재 작업 디렉터리에 있는 파일 or 하위 디렉터리의 목록을 보여주는 명령어. 3.#cd==> 현재 작업하는 디렉터리에서 다른 디렉터리로 변경할 때 사용하는 명령. 경로명 약자 사용.==> 경로명 약자는 명령 줄에서 디렉터리 이동 or 디렉터리를 참조할 때 빠른 수단으로 사용된다. Cf) 한글을 입력하려면 CTRL + SPACE.디렉터리 이름의 일부분을 입력하고, Tab키를 누르면 자동완성이 된다.
Allblackk
'#Programming Language/Linux' 카테고리의 글 목록 (2 Page)