목록ubuntu (3)
Joonas' Note
압축 파일을 압축 해제하려고 아래처럼 unzip을 실행했는데 에러가 났다. $ unzip dataset.zip -d data Archive: dataset.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of dataset.zip or ..
파일 전송이나 수정(분할, 삭제...), 삭제 등의 파일을 다루는 개발에서 적당한 크기의 더미 파일이 종종 필요하다. 그래서 매번 파이썬으로 제너레이터를 만들어서 사용했다. 가장 최근에 작성한 파일 생성 코드는 아래와 같다. 근데 리눅스 계열에서는 이미 명령어로 있었다. fallocate 라는 명령어인데, 사용 예시는 아래와 같다. 파일의 크기 단위는 GB, GiB, k 등 대소문자 구분이 없고, "iB" 는 생략해도 된다. 즉, k라고 적으면 킬로바이트(KiB)이다. 속도는 엄청 빠르다. 10GB 크기의 더미 파일 하나를 만드는 데에 0.01초가 안 걸렸다.
Ubuntu 16.04 LTS 에서 MongoDB 설치 오류 몇 가지 1. systemd (systemctl) 관련 오류우분투에 몽고DB 설치까진 잘 되었는데 서비스 시작이 안될 때가 있다. 나는 아래와 같은 오류를 만나서 당황했다.ubuntu@joonas-aws:~$ mongo --versionMongoDB shell version: 2.6.10ubuntu@joonas-aws:~$ sudo service mongod status● mongod.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)ubuntu@joonas-aws:~$ sudo service mongod startFailed to start ..