SLUG Mailing List Archives
Re: [SLUG] Escaping illegal characters in filenames - how?
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Escaping illegal characters in filenames - how?
- From: James <jam@xxxxxxxxx>
- Date: Fri, 8 Oct 2010 09:33:54 +0800
- User-agent: KMail/1.13.5 (Linux/2.6.35-22-generic; KDE/4.5.1; x86_64; ; )
On Friday 08 October 2010 09:00:03 slug-request@xxxxxxxxxxx wrote:
> > perhaps most
> > importantly, (l)user has been attacked with seriously large clue stick
> > and told to not do it again!
> Why? The only "illegal" characters in file names on a UNIX or Linux file
> system (including ext2 and ext3) are the forward slash (because it is the
> path separator) and NUL (because it is the string terminator). Everything
> else is perfectly legitimate to use (including having a file named "-rf
> *", which would only catch a very careless remover of the file)
The nice thing with vi is that it is predictable and consistant
ie you want the date in a document and have never done that before so yo do
(read the output of the command 'date', and you can predict that)
Likewise -- as an argument says no further options so
mv -- -fr zot
renames the file '-fr' to zot
cp -- zot -fr
copies zot to -fr
rm -- -fr zot
removes file '-fr' and file 'zot'
rm -fr zot will recursivly remove directory zot even if the files in it are
read only! so do beware