rf said:
Er, the latter would be for multi-line files then?
I don't know what you mean by multi-line files. Most non-binary files
contain more than one line of text.
It is pretty hard to create a file with a new line character in it (you
can't just open up OpenOffice and save one -- it won't let you) but here
is a script illustrating that it can be done.
============================================
#!/usr/bin/perl
$filename = "line one\nline two.txt";
open(FILE, ">$filename");
print FILE 'Testing';
close(FILE);
============================================
This will create a file called:
line one
line two.txt
If you try to look at it using the "ls" command, ls gets confused and
prints out a question mark instead of the new line character. However the
"find" command will let you see that it really does have a new line
character in it.
To delete:
rm -i line\ one?line\ two.txt