Search

'2012/09'에 해당되는 글 2건

  1. 2012.09.25 Linux - Ubuntu
  2. 2012.09.25 DBMS : MySql

Linux - Ubuntu

System 2012. 9. 25. 11:29 Posted by Jay Choi

Ubuntu Basic Command

  1. Install package

    apt-get install {Package Name}

     

  2. Check installed package

    dpkg --list

    dpkg --list | less

    dpkg --list | grep -i 'http'

     

     

  3. Uninstall package

    apt-get remove mplayer : For example remove package called mplayer, enter:

    apt-get --purge remove lighttpd : Remove package called lighttpd along with all configuration files, enter:

     

  4. Update and Upgrade

    apt-get update

    apt-get upgrade

     

  5. Search package

    apt-cache search {package-name}

    aptitude search {package-name}


댓글을 달아 주세요

DBMS : MySql

Database 2012. 9. 25. 11:27 Posted by Jay Choi

mysql 결과로 csv파일 생성

 

SELECT *

INTO OUTFILE "/tmp/result.csv"

FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'

LINES TERMINATED BY "\n"

FROM table;

 

txt 파일을 mysql에 로드

 

LOAD DATA INFILE '[filename]'

INTO TABLE [tablename]

FIELDS TERMINATED BY '\r' ENCLOSED BY '\r\n' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' ([columnname], ...);

댓글을 달아 주세요