String, StringBuffer, StringBuilder 차이 및 장단점
1. 개념 Java에서 문자열을 다루는 대표적인 클래스로 String, StringBuffer, StringBuilder가 있다. 연산이 많이 않을때는 특별한 이슈가 발생할 가능성이 거의 없지만, 연산횟수가 많아지거나 멀티스레드, 경쟁 상태(Race Condition) 등의 상황이 자주 발생하면 각 클래스의 특징을 이해하고 상황에 맞는 적절한 클래스...
1. 개념 Java에서 문자열을 다루는 대표적인 클래스로 String, StringBuffer, StringBuilder가 있다. 연산이 많이 않을때는 특별한 이슈가 발생할 가능성이 거의 없지만, 연산횟수가 많아지거나 멀티스레드, 경쟁 상태(Race Condition) 등의 상황이 자주 발생하면 각 클래스의 특징을 이해하고 상황에 맞는 적절한 클래스...
1. 접근 권한(chmod) 기존 파일 또는 디렉터리에 대한 접근 권한을 변경할때 사용하고, 파일 소유자나 슈퍼 유저만 변경 가능하다. 파일모드는 문자나 8진수로 지정한다. 1) chmod 도움말 [root@localhost ~]# chmod --help 사용법: chmod [옵션]... MODE[,MODE]... FILE... 또는: ch...
1. 시작 Shell Script 1) 파일생성 [root@localhost ~]# touch start.sh 2) 편집 [root@localhost ~]# vi start.sh 3) 추가 spring-boot-application에 로그 설정이 되어 있으면 nohup을 사용하지 않고 실행 로그설정: https://dejavu...
1. 변수 쉘변수는 처음 사용될 때 만들어진다. 즉 미리 선언할 필요가 없다. 쉘변수는 유닉스 명령과 마찬가지로 대소문자에 구별이 있다. 쉘변수는 기본적으로 데이터를 문자열로 저장한다. 수치를 대입해도 실제 수치가 아닌 문자열이 저장된다. 계산이 필요할 경우는 자동으로 수치로 변환하여 계산후 다시 문자열로 저장된다. 쉘변수의 값을 사...
1. 계정 추가 [root@localhost ~]# useradd mosquitto [root@localhost ~]# groupadd mosquitto 2. 의존성 패키지 설치 [root@localhost openssl]# make [root@localhost openssl]# make install [root@localhost openssl...
1. Eclipse Paho Client Mqttv3 Download Gradle compile group: 'org.eclipse.paho', name: 'org.eclipse.paho.client.mqttv3', version: '1.2.5' Maven <dependency> <groupId>or...
1. File Commands 1) ls directory listing 2) ls -al formatted listing with hidden files 3) cd dir change directory to dir 4) cd change to home 5) pwd show current directory 6) mkdir dir create...
1. 메모리 부족 메시지 IntelliJ 동작이 느리거나 메모리 부족 메시지가 뜬다. Low Memory The IDE is running low on memory and this mightaffect performance. please consider increasing available heap. 2. 메뉴에서 설정 1) 메뉴 He...
1. 프로세스 확인 1) 목록 확인 [root@localhost ~]# ps 2) 상세정보 확인 [root@localhost ~]# ps -f 2. 모든 프로세스 정보 # 목록 [root@localhost ~]# ps -e # 상세 정보 [root@localhost ~]# ps -ef 1) 목록 및 자원 사용률 [root@loca...
1. 압축 1) tar 압축 tar -cvf [파일명.tar] [폴더명] # abc 폴더를 abc.tar로 압축 [root@localhost ~]# tar -cvf abc.tar abc 2) tar.gz 압축 tar -zcvf [파일명.tar.gz] [폴더명] # abc 폴더를 abc.tar.gz로 압축 [root@localhost ~]# t...