본문 바로가기

C.E/Unix4

unix명령어 - background multihp1:/data2/unix/unix74>jobs [1] + Running sleep 50 & multihp1:/data2/unix/unix74>kill %1 - 하나의 unix를 더 실행하면 다른 터미널이기 때문에 다른 터미널에서는 sleep process가 보이지 않음. 즉 sleep을 실행한 해당창에서만 확인과 kill이 가능하다. >> background 작업을 forground로 바꾸기 : fg %num multihp1:/data2/unix/unix74>sleep 50 & [1] 4681 multihp1:/data2/unix/unix74>jobs [1] + Running sleep 50 & multihp1:/data2/unix/unix74>fg %1 sleep 50 >> nohup .. 2011. 2. 24.
unix 명령어 - 입출력 재지정자 multihp1:/data2/unix/unix74>ls ls.out ls1.out ls1.out이(가) 없습니다. ls.out multihp1:/data2/unix/unix74>ls ls.out ls1.out > ls.ok ls1.out이(가) 없습니다. multihp1:/data2/unix/unix74>cat ls.ok ls.out multihp1:/data2/unix/unix74>ls ls.out ls1.out 2> ls.ok ls.out multihp1:/data2/unix/unix74>cat ls.ok ls1.out이(가) 없습니다. multihp1:/data2/unix/unix74>ls ls.out ls1.out > ls.ok 2>&1 &1은 파일 디스크립터 번호임을 의미 multihp1:/da.. 2011. 2. 24.
unix 명령어 - awk 예제들 자세한 설명보기 man awk who | awk '{print $1}' | sort | uniq ♩로그인한 사용자의 이름을 정렬하고 반복 사용자는 제거한다. awk -F: '/^it0[0-9]/{ print $1 , $3 }' /etc/passwd ♩it00~it09 user의 name과 uid를 출력 awk -F: '$3>=700 { print $1 , $3 }' /etc/passwd ♩ du -s `awk -F: '$3>=100 { print $6 }' /etc/passwd` | more du -s `awk -F: '$3>=400 && $3 2011. 2. 23.
[Unix실습] 11월 20일 17. Exercise 1 4 Find out what files are in /bin, without changing your current directory. You should recognise the names of some of the programs stored there. $ls /bin 19. Exercise 3 1 Copy the file /etc/passwd to your home directory, and then use cat to see what’s in it. $cp /etc/passwd . 3 Make a directory called programs and copy everything from /bin into it. $mkdir programs $cp /bin/* progr.. 2008. 11. 20.