Unlink

unlink
운영 체제유닉스, 유닉스 계열
플랫폼크로스 플랫폼
종류명령어

unlink(언링크)는 유닉스 계열 운영 체제에서 파일을 삭제하기 위한 시스템 호출이자 명령 줄 유틸리티이다. 이 프로그램은 시스템 호출을 직접 인터페이스하며 마치 rmrmdir처럼 파일 이름과(그러나 GNU 시스템에서는 아님) 디렉터리를 제거한다.[1] 파일 이름이 해당 파일의 마지막 하드 링크라면 파일 그 자체는 프로그램이 해당 파일을 열자마자 삭제된다.[2]

예시

foo라는 파일을 삭제한다:

% unlink foo

PHP에서 다음의 함수를 사용하여 동일한 작업을 할 수 있다:

unlink("foo");

펄 문법은 PHP 문법과 거의 동일하다:

unlink "foo";

Node.js 또한 문법이 비슷하다:

fs.unlink("foo", callback);

R의 경우:

unlink("foo")
#Comment: using the inside argument 'recursive = TRUE', directories can be deleted

파이썬:

os.unlink("foo")

같이 보기

각주

  1. “GNU Coreutils: unlink invocation”. 《www.gnu.org》. 
  2. “unlink”. 《pubs.opengroup.org》. 

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.