Re: telnet and file names
Dave Dodge <[email protected]>
| Newsgroups | gmane.comp.hardware.roku.technical |
|---|---|
| Message-ID | <20040613021640.GK28985@basmati> |
On Sat, Jun 12, 2004 at 03:27:33PM +0000, Barry Gordon wrote:
> The actual file name is suffixed with an "@" (rc.local@). If I do a
> cat /mnt/flash0/etc/rc.local@ a diagnostic is returned saying the file does
> not exist. What is the meaning of the trailing "@"?
These suffixes don't really exist in the filenames. You're probably
passing the "-F" or "-p" option to "ls" to generate the list of files.
What's happening is that "ls" is adding those suffixes to its output
as a quick hint to the user about the file type.
These suffixes are only meaningful in the "ls" output, which is why
the system complained when you tried to read "rc.local@". The actual
filename is "rc.local", and it's a symbolic link to some other file.
The "-l" option to ls is one way of finding out what a link points to:
# ls -l /mnt/flash0/etc/rc.local
... /mnt/flash0/etc/rc.local -> rc.d/rc.local
Link paths are relative if they don't start with a "/", so in this
case the actual file is "/mnt/flash0/etc/rc.d/rc.local". But really
you shouldn't have to know that (see below).
> What are the other file name suffixes and what do they signify?.
* regular file with the executable bit turned on
@ symbolic link
/ directory
= UNIX domain socket
| named pipe
The last two are pretty rare.
> If I do a cat /mnt/flash0/etc/rc.local the file appears to be empty.
> Is that correct?
The default behavior when opening a symbolic link is that the system
quietly follows the link to its destination. You shouldn't have to do
anything special; just open the link like any other file and you ought
to end up reading or writing the file it points to. I'm not sure what
you're doing that's disabling that.
> A recommendation on a book that explains all of this would probably get me
> educated faster and be less of an imposition on the good guys. I have some
> Linux books, but I can not find the info I am looking for.
For this sort of thing you'll want something that focuses on the Unix
shell. I hear that "Learning the Unix Operating System" from O'Reilly
might be a good choice.
-Dave Dodge