一寸大海 劫長之井
리눅스에서 콘솔이 종료 되어도 명령 실행 시키기. - nohup
리눅스 콘솔에서 명령을 실행 시킬 때, 백그라운드에서 실행을 시키고 싶을 때가 있습니다. 이때 사용 되는 방식이 뒤에 & 를 찍는 방법과 nohup 을 쓰는 방법이 있습니다. 일단 테스트를 위한 파이썬 프로그램을 만들어 봅시다. #!/usr/bin/python # -*- coding: utf-8 -*- import time import datetime def out(string): print(string) f = open(string, "w") f.close() s = datetime.datetime.now s = "test" for i in range(0, 10): time.sleep(1) out("%s__Counting_%d " % (s, i)) out("%s__Counting_Complete" % ..
기타
2016. 8. 5. 15:54