由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - how to delete a file with NULL name in unix? (转载)
相关主题
link 一问how to delete this directory?
where is gcc?How to find old mail?
[转载] how to find IP of current server of UNIX by C language(NULL)question about digital unix
Re: [转载] how to find IP of current server of UNIX by C language(NULL[转载] 请问linux 和unix vi一样吗?
[转载] UNIX下的strtokUrgent help!!!
UNIX 下, 如何进入带空格的目录? (NULL)Linux/Unix下时间的精度 (转载)
Re: UNIX 下, 如何进入带空格的目录? (NULL) ----Many Thanks!Am I in trouble?
如何在UNIX下播放MOV格式的电影(NULL)what's wrong with gcc?
相关话题的讨论汇总
话题: null话题: file话题: unix话题: name话题: delete
进入Unix版参与讨论
1 (共1页)
w***z
发帖数: 1848
1
【 以下文字转载自 Linux 讨论区 】
发信人: windz (风子), 信区: Linux
标 题: how to delete a file with NULL name in unix?
发信站: BBS 未名空间站 (Tue May 8 12:08:36 2007)
I accidentally create a file with null name in unix. if I do "ls -l", I can
see the entry but cannot see the file name. How can I delete it?
y********o
发帖数: 2565
2
Maybe it can help if you use regex after rm.

can

【在 w***z 的大作中提到】
: 【 以下文字转载自 Linux 讨论区 】
: 发信人: windz (风子), 信区: Linux
: 标 题: how to delete a file with NULL name in unix?
: 发信站: BBS 未名空间站 (Tue May 8 12:08:36 2007)
: I accidentally create a file with null name in unix. if I do "ls -l", I can
: see the entry but cannot see the file name. How can I delete it?

q**1
发帖数: 193
3
rm does not suppport regex
i think this had been answered somewhere else. the safest
way is use 'inode'
find inode of the file(assume it's ###):
ls -i
remove with find
find -inum ### -exec rm -f {} \;

【在 y********o 的大作中提到】
: Maybe it can help if you use regex after rm.
:
: can

y********o
发帖数: 2565
4
O, I was suggesting that he could probably do something like rm * and enter
Y or N to selectively remove files he wanted to discard.

【在 q**1 的大作中提到】
: rm does not suppport regex
: i think this had been answered somewhere else. the safest
: way is use 'inode'
: find inode of the file(assume it's ###):
: ls -i
: remove with find
: find -inum ### -exec rm -f {} \;

q**1
发帖数: 193
5
that's shell wildcard, not regex. :-)

enter

【在 y********o 的大作中提到】
: O, I was suggesting that he could probably do something like rm * and enter
: Y or N to selectively remove files he wanted to discard.

y********o
发帖数: 2565
6
;-Q

【在 q**1 的大作中提到】
: that's shell wildcard, not regex. :-)
:
: enter

1 (共1页)
进入Unix版参与讨论
相关主题
what's wrong with gcc?[转载] UNIX下的strtok
fileIDUNIX 下, 如何进入带空格的目录? (NULL)
HOw to find files hardlinked to a same inode?Re: UNIX 下, 如何进入带空格的目录? (NULL) ----Many Thanks!
[转载] 问一个file system的问题?如何在UNIX下播放MOV格式的电影(NULL)
link 一问how to delete this directory?
where is gcc?How to find old mail?
[转载] how to find IP of current server of UNIX by C language(NULL)question about digital unix
Re: [转载] how to find IP of current server of UNIX by C language(NULL[转载] 请问linux 和unix vi一样吗?
相关话题的讨论汇总
话题: null话题: file话题: unix话题: name话题: delete