[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: An Odd File Name



I only remember part of this unfortunately. When a situation like this happens you got to get the file's inode number then reference it using that inode number and perhaps open it. This topic was covered shortly in the Unix class I took back in 1990. How to do the rest of it I think is done with find but don't quote me on that.

On Mon, 13 Feb 2017, Martin McCormick wrote:

Date: Mon, 13 Feb 2017 12:06:24
From: Martin McCormick <martin.m@suddenlink.net>
To: debian-user@lists.debian.org
Subject: An Odd File Name
Resent-Date: Mon, 13 Feb 2017 17:06:46 +0000 (UTC)
Resent-From: debian-user@lists.debian.org

	I downloaded a file from a site using lynx and the file
name is "InstallingGRFromSource#Using-the-build-gnuradio-script.gz"
Actually, the double quotes are here for clarity but the name is
as it appears including the # sign.  Ls sees it and rm -i would
remove it if I let it but if I do:

gunzip InstallingGRFromSource#Using-the-build-gnuradio-script.gz

or

ls InstallingGRFromSource#Using-the-build-gnuradio-script.gz

bash can't find/see the file.

I am a bit embarrassed to ask this question because I have been
using unix for about 28 years and am well aware that certain
characters in file names such as blank spaces cause problems but
these are usually negated by either putting the whole file name
in double quotes or by escaping the troublesome character with a \ or backslash.

	While there is no whitespace character anywhere in the
name, there are several dashes and a # sign which is probably the
worst offender. I tried escaping the # symbol with a backslash
with no change and then I tried escaping all the dashes with
backslash characters as in \- and \# but commands referencing the
file by name all come up short. I also did try the whole name in
both single and double quotes.

	This is a teachable moment but I am not sure what else to
do other than remove all the other files in the directory and
then gunzip * which might work but that's sure going about things
the weird way rather than systematically. I did list the file by
using ls and piped that in to a file which I then removed all
names but the problem one and then used od -tx1 on the file name,
piping that to less so I could see if there were any 8-bit
characters or some other oddity, but the name was composed
only of the letters you see.

	By the way, gunzip does not have a -i flag like rm but
that thought crossed my mind.

	Since the name is long, I did make a short file with the
command such as ls or gunzip and the file name and then I typed

source thatfile

or sh thatfile so I did not type the command directly from the
command prompt but normally the source command is as if you did
type on the keyboard from the prompt.

	Any ideas for matching that name?

Thank you.

Martin McCormick WB5AGZ



--


Reply to: