Re: ls no display directory
Lawrence Lucier <email@example.com> writes:
> Howdy all........:-)
G'day mate. ;-)
> I inadvertently typed " cd\ " (without the quotes) while
> at the root prompt. I got a what looked like a DOS prompt
> " > " (again without the quotes) so I am assuming that
> somehow I switched over to DOS mode somehow.
No. All directory separators are "/" in Unix. "\" is used in lots of
programs (and C compilers) at the end of the line to indicate that the
next line is part of the current line, and bash uses ">" to indicate
that you've done this:
$ echo foo\
BTW, you need a space between all arguments in Unixes.
> Anyways to make a long story short, now whenever I try to
> do a directory listing of root with " ls " (yes indeed,
> without the quotes) no directory names/files are
Is this in _the_ root directory, or in "/root"? If you log in as root
you'll start in /root which is root's home directory. If you type
"cd /" then ls you'll get a listing of _the_ root directory. There
won't be anything in /root to start with, except some hidden files.
Type "ls -a" (or "ls -la") to see them, like DIR/AH. Type "pwd" to
find out which directory you're in (like CD on its own in DOS).
> Opps, almost forgot! How does one go about displaying
> which directory they are in as part of the prompt?
> eg: etc/foo/bar#
First of all, you should be doing this as the normal user you set up
when you installed Debian. That way, "rm -rf *" in the wrong place
won't result in a reinstall (like DELTREE WINDOWS would).
Then edit your .bash_profile and add `PS1="\\w\\$ "', and log out and
back in, or type it yourself at the prompt.
I hop I don't offend you by assuming you've had some DOS experience!
Carey Evans <*> http://home.clear.net.nz/pages/c.evans/ gc
kernel: Warning: possible SYN flooding. Sending cookies.
kernel: validated probe(100007f, 100007f, 11557, 5010, -1645409555)
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .