Re: ls no display directory
On Sat, 4 Oct 1997, Lawrence Lucier wrote:
> 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. [..]
Linux does not have a built-in dos-mode. The backslash was interpretted
as a continuation symbol; i.e.:
debian# pwd <-- pwd == print working directory
> 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
> displayed. If I switch to a subdirectory or do a "ls"
> (yep, you guessed it!<g>) with full directory path, then
> ls seems to work just fine.....it's only in the root
> directory that names aren't displayed.
Don't forget that to see all files you need to use the -a option to ls.
Without the -a, the "dot" files (those beginning with a dot, and this
includes directories such as ~/.netscape/) and user "configuration" or
"rc" (resource configuration) files (~/.bashrc) are hidden.
If you want to always see all files, you can setup an alias in your
~/.bashrc (~/ and $HOME mean the user's home directory), such as:
alias ls='ls -a'
Another convenient ls option would be --color=tty or --color=auto.
Yet another convenience would be the FileRunner package for X windows
(fr &) or the MidnightCommander package for the console (mc). Pilot
(pilot) comes in handy from time to time also. There are .deb packages
for these in dselect, so you can use search to find them (/).
> Opps, almost forgot! How does one go about displaying
> which directory they are in as part of the prompt?
The bash shell handles the prompt, so if you want to customize your
prompt further, you'll need to look up the code in man bash, but this
does what you're asking and a little more. Put this in your ~/.bashrc:
PS1="[\u@\h \W]\\$ "
While Debian does not come with an /etc/bashrc file, you can create one
(copy the ~/.bashrc to /etc/bashrc). /etc is the system "rc" file
location. Note that system rc files are not dotfiles. You'll need to
be root to modify files in /etc, but you should be able to use su.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .