- 다른 뜻에 대해서는 리눅스 unlink 문서를 참조하십시오.
- unlink
- rm
1 Bash
Bash
Copy
echo 'John Smith' > /tmp/a.txt
if [ ! -f /tmp/a.txt ]; then echo 'File not found #1'; fi
rm -f /tmp/a.txt
if [ ! -f /tmp/a.txt ]; then echo 'File not found #2'; fi
# File not found #2
2 PHP
PHP
Copy
file_put_contents('/tmp/a.txt', 'unlinkJohn Smith');
if( !file_exists('/tmp/a.txt') ) echo 'File not found #1'.PHP_EOL;
unlink('/tmp/a.txt');
if( !file_exists('/tmp/a.txt') ) echo 'File not found #2'.PHP_EOL;
// File not found #2
3 같이 보기
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.