📄 ch23_11.htm
字号:
<HTML><!--Distributed by F --><HEAD><TITLE>[Chapter 23] 23.11 Deleting Files with Odd Names </TITLE><METANAME="DC.title"CONTENT="UNIX Power Tools"><METANAME="DC.creator"CONTENT="Jerry Peek, Tim O'Reilly & Mike Loukides"><METANAME="DC.publisher"CONTENT="O'Reilly & Associates, Inc."><METANAME="DC.date"CONTENT="1998-08-04T21:41:08Z"><METANAME="DC.type"CONTENT="Text.Monograph"><METANAME="DC.format"CONTENT="text/html"SCHEME="MIME"><METANAME="DC.source"CONTENT="1-56592-260-3"SCHEME="ISBN"><METANAME="DC.language"CONTENT="en-US"><METANAME="generator"CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"><LINKREV="made"HREF="mailto:online-books@oreilly.com"TITLE="Online Books Comments"><LINKREL="up"HREF="ch23_01.htm"TITLE="23. Removing Files"><LINKREL="prev"HREF="ch23_10.htm"TITLE="23.10 Deletion with Prejudice: rm -f "><LINKREL="next"HREF="ch23_12.htm"TITLE="23.12 Using Wildcards to Delete Files with Strange Names "></HEAD><BODYBGCOLOR="#FFFFFF"TEXT="#000000"><DIVCLASS="htmlnav"><H1><IMGSRC="gifs/smbanner.gif"ALT="UNIX Power Tools"USEMAP="#srchmap"BORDER="0"></H1><MAPNAME="srchmap"><AREASHAPE="RECT"COORDS="0,0,466,58"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="467,0,514,18"HREF="jobjects/fsearch.htm"ALT="Search this book"></MAP><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch23_10.htm"TITLE="23.10 Deletion with Prejudice: rm -f "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 23.10 Deletion with Prejudice: rm -f "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><B><FONTFACE="ARIEL,HELVETICA,HELV,SANSERIF"SIZE="-1">Chapter 23<BR>Removing Files</FONT></B></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch23_12.htm"TITLE="23.12 Using Wildcards to Delete Files with Strange Names "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 23.12 Using Wildcards to Delete Files with Strange Names "BORDER="0"></A></TD></TR></TABLE> <HRALIGN="LEFT"WIDTH="515"TITLE="footer"></DIV><DIVCLASS="SECT1"><H2CLASS="sect1"><ACLASS="title"NAME="UPT-ART-7490">23.11 Deleting Files with Odd Names </A></H2><PCLASS="para"><ACLASS="indexterm"NAME="UPT-ART-7490-IX-FILENAMES-SPECIAL-CHARACTERS"></A><ACLASS="indexterm"NAME="UPT-ART-7490-IX-DELETING-FILES-WITH-SPECIAL-FILENAME-CHAR"></A><ACLASS="indexterm"NAME="UPT-ART-7490-IX-SPECIAL-CHARACTERS-FILENAMES"></A>A perennial problem is deleting files that have strange characters (orother oddities) in their names. The next few articles contain somehints for:</P><ULCLASS="itemizedlist"><LICLASS="listitem"><PCLASS="para">Deleting files with random control characters in their names(article<ACLASS="xref"HREF="ch23_12.htm"TITLE="Using Wildcards to Delete Files with Strange Names ">23.12</A>).</P></LI><LICLASS="listitem"><PCLASS="para">Deleting files with a "null" name (article<ACLASS="xref"HREF="ch23_13.htm"TITLE="Deleting Files with the Null Name ">23.13</A>).</P></LI><LICLASS="listitem"><PCLASS="para">Deleting files whose names that start with a dash (article<ACLASS="xref"HREF="ch23_14.htm"TITLE="Handling a Filename Starting with a Dash (-) ">23.14</A>).</P></LI><LICLASS="listitem"><PCLASS="para">Deleting files with "unprintable" filenames (article<ACLASS="xref"HREF="ch23_15.htm"TITLE="Using unlink to Remove a File with a Strange Name ">23.15</A>).</P></LI><LICLASS="listitem"><PCLASS="para">Deleting files by using the inode number (article<ACLASS="xref"HREF="ch23_16.htm"TITLE="Removing a Strange File by its I-number ">23.16</A>).</P></LI><LICLASS="listitem"><PCLASS="para">Deleting directories, and problems that can arise (article<ACLASS="xref"HREF="ch23_17.htm"TITLE="Problems Deleting Directories ">23.17</A>).</P></LI></UL><PCLASS="para">We'll also give hints for:</P><ULCLASS="itemizedlist"><LICLASS="listitem"><PCLASS="para">Deleting unused (or rarely used) files (articles<ACLASS="xref"HREF="ch23_19.htm"TITLE="Deleting (BSD) Manual Pages that Aren't Read ">23.19</A>and <ACLASS="xref"HREF="ch23_20.htm"TITLE="Deleting Stale Files ">23.20</A>).</P></LI><LICLASS="listitem"><PCLASS="para">Deleting all the files in a directory, except for one or two (article <ACLASS="xref"HREF="ch23_21.htm"TITLE="Removing Every File but One ">23.21</A>).</P></LI></UL><DIVCLASS="sect1info"><PCLASS="SECT1INFO">- <SPANCLASS="authorinitials">ML</SPAN></P></DIV></DIV><DIVCLASS="htmlnav"><P></P><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch23_10.htm"TITLE="23.10 Deletion with Prejudice: rm -f "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 23.10 Deletion with Prejudice: rm -f "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="book"HREF="index.htm"TITLE="UNIX Power Tools"><IMGSRC="gifs/txthome.gif"SRC="gifs/txthome.gif"ALT="UNIX Power Tools"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch23_12.htm"TITLE="23.12 Using Wildcards to Delete Files with Strange Names "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 23.12 Using Wildcards to Delete Files with Strange Names "BORDER="0"></A></TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172">23.10 Deletion with Prejudice: rm -f </TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="index"HREF="index/idx_0.htm"TITLE="Book Index"><IMGSRC="gifs/index.gif"SRC="gifs/index.gif"ALT="Book Index"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172">23.12 Using Wildcards to Delete Files with Strange Names </TD></TR></TABLE><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><IMGSRC="gifs/smnavbar.gif"SRC="gifs/smnavbar.gif"USEMAP="#map"BORDER="0"ALT="The UNIX CD Bookshelf Navigation"><MAPNAME="map"><AREASHAPE="RECT"COORDS="0,0,73,21"HREF="../index.htm"ALT="The UNIX CD Bookshelf"><AREASHAPE="RECT"COORDS="74,0,163,21"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="164,0,257,21"HREF="../unixnut/index.htm"ALT="UNIX in a Nutshell"><AREASHAPE="RECT"COORDS="258,0,321,21"HREF="../vi/index.htm"ALT="Learning the vi Editor"><AREASHAPE="RECT"COORDS="322,0,378,21"HREF="../sedawk/index.htm"ALT="sed & awk"><AREASHAPE="RECT"COORDS="379,0,438,21"HREF="../ksh/index.htm"ALT="Learning the Korn Shell"><AREASHAPE="RECT"COORDS="439,0,514,21"HREF="../lrnunix/index.htm"ALT="Learning the UNIX Operating System"></MAP></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -