escaping filenames
Thomas Stivers
stivers_t at tomass.dyndns.org
Fri Aug 13 15:09:45 EDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Aug 13 2004 at 02:18:35PM -0400, Terry D. Cudney wrote:
> Hi all,
>
> In this thread, how do I get rid of a file that shows up in an 'ls' listings as "^K". It is a zero length file, but persistently there.
Well that is likely a control k character and a bit funny to type. One way is to use control-v to escape the next control char, so you would do control-v control-k as the argument to an rm or mv command. Another nifty trick is to use ls and find to get crazy files by their inode number. For example:
~$ ls -i
77871 bin
78082 lynx_bookmarks.html
93045 Maildir
108489 tmp
93244 xml
~$ find ~ -inum 93244
/home/stivers_t/xml
Its kind of a cluge, but it was the only way back in the days of funky terminals that didn't do control characters.
HTH or at least hope it was interesting.
- --
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Thomas Stivers e-mail: stivers_t at tomass.dyndns.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBHRH55JK61UXLur0RAsevAJ96SXBTkl2kK+vbofdXNAa3inlknwCfe1nX
LfAXU3JblslaoBzAEq+tsww=
=0xvc
-----END PGP SIGNATURE-----
More information about the Speakup
mailing list