본문 바로가기

OS/Linux

CentOS 리눅스에서의 파일생성 echo

echo
[multi@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.18-53.1.13.el5 #1 SMP Tue Feb 12 13:01:45 EST 2008 i686 i686 i386 GNU/Linux
[multi@localhost ~]$ pwd //현재 디렉토리 확인
/home/multi
[multi@localhost ~]$ mkdir test1 //백업할 test1 디렉토리 생성
[multi@localhost ~]$ cd test1
[multi@localhost test1]$ pwd
/home/multi/test1
[multi@localhost test1]$ echo "test1" > test1.txt //test1.txt 파일 만들기
[multi@localhost test1]$ echo "test2" > test2.txt //test2.txt 파일 만들기
[multi@localhost test1]$ echo "test3" > test3.txt //test3.txt 파일 만들기
[multi@localhost test1]$ ls -l // 파일이 생성되었는지 확인
합계 12
-rw-rw-r-- 1 multi multi 6  2월 21 02:00 test1.txt
-rw-rw-r-- 1 multi multi 6  2월 21 02:00 test2

[출처 : 한국리눅스유저그룹] http://www.lug.or.kr