(分享!)空链接文件的删除

OOo,TeX,KO,ABI,GIMP,Picasa,ProE,QCAD,Inkscape,Kicad,Eagle
回复
头像
jazzi
帖子: 532
注册时间: 2005-10-16 23:26
来自: 泉州
送出感谢: 0
接收感谢: 3 次
联系:

(分享!)空链接文件的删除

#1

帖子 jazzi » 2005-12-16 10:18

今天发现一个小问题,有几个链接文件点右键删除无法删除,因为链接文件所链接的文件已经被删除了。
链接文件示例:link to link to 我的爱人.wma

参考man link教程:
12.8 `unlink': Remove files via the unlink syscall
==================================================

`unlink' deletes a single specified file name. It is a minimalist
interface to the system-provided `unlink' function. *Note Deleting
Files: (libc)Deleting Files. Synopsis:

unlink FILENAME

On some systems `unlink' can be used to delete the name of a
directory. On others, it can be used that way only by a privileged
user. In the GNU system `unlink' can never delete the name of a
directory.

By default, `unlink' honors the `--help' and `--version' options.
That makes it a little harder to remove files named `--help' and
`--version', so when the environment variable `POSIXLY_CORRECT' is set,
`unlink' treats such a command line arguments not as an option, but as
an operand.
`unlink' treats such a command line arguments not as an option, but as
an operand.

An exit status of zero indicates success, and a nonzero value
indicates failure.

得出解决方法:unlink "空链接文件名"
示例:unlink "link to link to 我的爱人.wma"
这里值得注意的一点是文件名必须得用双引号括起来。
You make it fun
It will make you fun
回复

回到 “办公、图像、机械电子设计等”