Linux에서 파일 타입 알아내기

http://mark0.net/soft-trid-e.html 파일 다운로드후 trid zip 파일을 압축을 푼다. 실행가능하도록 설정 chmod u+x trid   TrID 파일 아래의 defs 파일도 같이 다운받는다. TrIDDefs.TRD package, 891KB ZIP (6673 file types, 13/03/16) 파이썬 업데이트 파일도 다운받고 업데이트 시킨다. user1@ubuntu-desktop:~/Downloads$ unzip tridupdate.zip Archive: tridupdate.zip inflating: tridupdate.py user1@ubuntu-desktop:~/Downloads$ python tridupdate.py File triddefs.trd not found Checking last version online… MD5: 337d77f877de39f646592ec082919730 […]

리눅스에서 리모트로 외부 프로그램 자신의 데탑으로 띄우기

실행순서 @@ Server 192.168.0.160, Client 192.168.0.150 인 상황에서   @@ 서버로부터 접근 [150에서 접근한다] ssh -X -l user1 192.168.0.160   @@ 192.168.0.150 아이피를 xhost 대상에서 제거한다. xhost – inet:192.168.0.150 192.168.0.150 being removed from access control list   @@ 다음으로 명령어 실행하면 됨 $ filezilla  

html2pdf 우분투에서 PDF 생성 하는 프로그램 활용 방법

wkhtmltopdf 설치 sudo apt-get install wkhtmltopdf @@ 커맨드 모음 wkhtmltopdf –user-style-sheet ~/apps/wkhtmltopdf/font.css -s A4 –header-right "[webpage]" http://www.qtcentre.org/archive/index.php/t-51448.html ~/Documents/temp.pdf wkhtmltopdf –user-style-sheet ~/apps/wkhtmltopdf/font.css -s A4 –footer-left "[webpage]" http://askubuntu.com/questions/104695/how-do-i-change-mirrors-in-ubuntu-server-from-regional-to-main ~/Desktop/workspace/Prints/temp/temp.pdf wkhtmltopdf –no-outline -B 6mm -L 4mm -R 4mm -T 4mm –user-style-sheet font.css -s A4 –footer-font-size 8 –footer-line –footer-left "[webpage]" \ http://daum.net \ ~/Documents/temp.pdf wkhtmltopdf –user-style-sheet ~/apps/wkhtmltopdf/font.css -s A4 […]

Ubuntu Install History 관련 히스토리 정리

Ubuntu Install History @@ INSTALL PACKAGE sudo apt-get install libxss1 filezilla tomboy sshpass gimp ibus \ ibus-hangul openjdk-7-jdk vim-gnome nautilus-open-terminal atop htop \ lsb-core mysql-client mysql-server apache2 php5 libapache2-mod-php5 \ ssh sshfs curl sshpass php5-mysql php5-mcrypt ant git geoip-bin \ nmap tcpflow build-essential libnl-3-dev openssl ettercap-text-only \ hydra dsniff sslstrip libssl-dev rapidsvn gnome-session-fallback whois \ […]

PART1: 우분투 관련 메모들

우분투 전역변수 설정 vi /etc/environment   노틸러스에 이미지 리사이징 하는 메뉴 붙이기 sudo apt-get install nautilus-image-converter imagemagick   Ubuntu Custom Login Profile sudo cp /usr/share/xsessions/gnome-fallback.desktop /usr/share/xsessions/custom.desktop sudo vi /usr/share/xsessions/custom.desktop [Desktop Entry] Name=Webterror Session Comment=Custom ~/.xsession script Exec=/home/webterror/.xsession X-Ubuntu-Gettext-Domain=gdm   외부 FTP 마운트 시키기 webterror@webterror:~$ cat /etc/fuse.conf # Set the maximum number of FUSE mounts allowed […]

16.04 우분투 설치 히스토리

우분투 16.04 설치 순서, – webterror가 반드시 진행하는 것들을 순서대로 적어놓았다. 1. settings – 언어추가하기 2.  크롬설치 3. tomboy 설치 $ sudo apt-get install tomboy sshfs   4. ssh 동기화 시킬것 $ ssh-keygen $ ssh-copy-id -i ~/.ssh/tomboy.pub webterror@domain.net   5. ibus 한글, 일본어, 중국어 추가하기 $ sudo apt-get install ibus-hangul ibus-anthy ibus-pinyin $ ibus-daemon -rdx […]

리눅스에서 ip 확인후 메일로 보내주기

자신의 아이피 확인 curl http://www.ipip.kr 2>/dev/null | grep "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" curl http://www.ipip.kr 2>/dev/null | grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" %% -o 옵션은 grep 으로 match 된것만 출력하라는 의미 현재 ipip.kr은 존재하지 않는다. 따라서 저 위의 스크립트는 다른 사이트로활용해야 하겠다. ip 정규표현식을 이용한 grep : grep “[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+”   IPADDR=$(curl http://www.ipip.kr 2>/dev/null | grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" | head -n 1); […]

리눅스에서의 printf의 활용

URL : https://linuxconfig.org/bash-printf-syntax-basics-with-examples $ printf "%s\n" "1" "2" "\n3" 1 2 \n3 %b를 사용하면 \n 개행문자를 인식해서 출력한다. $ printf "%b\n" "1" "2" "\n3" 1 2 3 $   %f는 기본적으로 6자리 소수점을 나타낸다. $ printf "%f\n" 255 0xff 0377 3.5 255.000000 255.000000 377.000000 3.500000   .1로 표현하면 소수점 이하 표시구간을 정할수 있다. $ printf […]