본문 바로가기

전체 글

(282)
[리눅스 쉘 스크립트 마스터] 01쉘기초명령어_04wc사용법 홍영기님 리눅스 쉘 스크립트 마스터 강의 입니다. WC명령어 단어의 개수를 셀때 -w 옵션을 준다. test@ykd2:~/shell_cmd$ cat fruits.txt grapes orange tomato strawberry apple test@ykd2:~/shell_cmd$ wc -w fruits.txt 5 fruits.txt 라인의 개수를 셀때 -l 옵션을 준다. test@ykd2:~/shell_cmd$ wc -l fruits.txt 6 fruits.txt 단어의 수를 셀때 -c 옵션을 준다. test@ykd2:~/shell_cmd$ wc -c fruits.txt 39 fruits.txt
[리눅스 쉘 스크립트 마스터] 01쉘기초명령어_03test문 홍영기님 리눅스 쉘 스크립트 마스터 강의 입니다. 테스트문 테스트문은 test -f 'Gone With the Wind.mp3' 또는 [ -f 'Gone With the Wind.mp3' ] 이렇게 적용한다. 결과는 마지막명령어 결과값 저장 변수인 $?를 통해 확인할 수 있다. 0이면 성공, 1이면 실패 test@ykd2:~$ ls -l mydir total 0 -rw-rw-r-- 1 test test 0 Jan 5 03:41 Gone -rw-rw-r-- 1 test test 0 Jan 5 03:41 'Gone With the Wind.mp3' -rw-rw-r-- 1 test test 0 Jan 5 03:41 the -rw-rw-r-- 1 test test 0 Jan 5 03:41 Wind.mp3 -rw..
[리눅스 쉘 스크립트 마스터] 01쉘기초명령어_02인용문 홍영기님 리눅스 쉘 스크립트 마스터 강의 입니다. 인용문 공백이 포함된 인자에 대해서는 ' ' or " "로 묶어줘야함. 인자사이에 공백이 포함되면 다른 인자로 인식하기 때문 test@ykd2:~$ touch 'Gone With the Wind.mp3' test@ykd2:~$ ls 'Gone With the Wind.mp3' test@ykd2:~$ touch Gone With the Wind.mp3 test@ykd2:~$ ls Gone 'Gone With the Wind.mp3' the Wind.mp3 With
[리눅스 쉘 스크립트 마스터] 01쉘기초명령어_01echo사용법 홍영기님 리눅스 쉘 스크립트 마스터 강의 입니다. echo 사용법 명령문 인자 사이의 공백은 많아도 한개로만 인식된다. root@ykd2:/# echo hello world hello world root@ykd2:/# echo "hello world" hello world \n과 같은 특수문자를 실제 적용되게 하려면 -e를 적용한다. root@ykd2:/# echo "hello world\n\n" hello world\n\n root@ykd2:/# echo -e "hello world\n\n" hello world root@ykd2:/# echo *는 ls와 비슷한데 모든 출력값을 공백으로만 구분하여 substring할때 유용하다. root@ykd2:/# ls bin dev home lib32 libx3..
[ Linux ] Ubuntu 버전 확인 /etc/issue파일에서 리눅스 버전을 확인할 수 있다. test@ykd2:~$ cat /etc/issue Ubuntu 22.04.1 LTS \n \l
[ Docker ] Docker 명령어 모음 1. container 리스트 확인 - 실행중인 컨테이너 리스트만 확인 $docker container ls - 전체 컨테이너 리스트 확인 $docker container ls -a
[ Linux ] vi editor 사용법정리 1. number링 하기 명령문 모드에서 set nu
[ Jenkins를 이용한 CI/CD ] 00실습환경_05SSH서버 설치 1. Docker Hub에서 이도원님 서버 이미지 다운 - edowon0623 으로 검색 - edowon0623/docker선택 후 "Docker pull Command"버튼 클릭하여 명령문 복사 - 복사된 docker pull edowon0623/docker:latest로 이미지를 다운로드 한다 2. Container 생성 - docker image ls로 다운되었는지 확인한다. - docker image를 통해 container를 생성한다. . docker run --privileged --name docker-server -itd -p 10022:22 -p 8081:8080 -e container=docker -v /sys/fs/cgroup:/sys/fs/cgroup edowon0623/docker..