본문 바로가기

linux9

Modules 기능 사용시 modulefile 인식 가능한 PATH 등록하기 Modules 구성하다가 modulefile을 인식 가능한 PATH가 ~/Applications/Modules/3.2.10/modulefiles 로 고정되어 있다. 세분화해서 분류하고자 할 때 아래 파일에 절대경로 위치를 한줄씩 적어주면 해당 경로에 있는 modulefile을 따로 분리해 주는 것이 가능하다. ~/Applications/Modules/3.2.10/init/.modulespath 2015. 12. 8.
파일 이름에 있는 공백 제거하기 리눅스를 오래 쓰다보니 파일 이름에 공백 대신 '_' 를 이용하는게 익숙해졌습니다. 종종 윈도우에서 작업한 파일들을 가지고 데이터 처리를 진행할 때 리눅스로 가져오면 파일이름에 있는 공백이 여간 귀찮은게 아니네요. 이럴 때는 rename 명령어 하나로 간단하게 해결이 가능합니다. 원리는 간단 합니다. * (모든파일)에 대해 " " (공백) 을 "_" 로 바꾸라는 것! 1rename " " "_" *cs 2015. 11. 5.
xargs vs. exec {} This is where -exec breaks down and xargs shows its superiority. When you use -exec to do the work you run a separate instance of the called program for each element of input. So if find comes up with 10,000 results, you run exec 10,000 times. With xargs, you build up the input into bundles and run them through the command as few times as possible, which is often just once. When dealing with hun.. 2015. 9. 5.
리눅스 에서 zip 파일 압축하기/압축풀기 압축하기 1. 현재 디렉토리에 있는 모든 파일을 test.zip 으로 압축할 때 zip test.zip ./* 2. 현재 디렉토리에 있는 모든 파일 및 하위폴더 까지 압축하려면 -r 옵션을 이용한다. zip -r test.zip ./* 압축풀기 unzip test.zip 2015. 7. 10.