Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
While working on an SBC (TS 7200) running Red Hat, I entered the following:
mount /dev/mtdblock/1 /mnt
So far I understand I've mounted my filesystem (happened to be that particular partition) over again but now in /mnt. However, now all my files/directories are appended with the same characters.
An example snippet:
(here's a snippet of my /bin directory)
$ ls /bin
1;36maddgroup0m 1;36mdd0m 1;36mgunzip0m 1;36mmknod0m 1;36 mrm0m 1;36mtrue0m
1;36madduser0m 1;36mdelgroup0m 1;36mgzip0m 1;36mmktemp0m 1;36 mrmdir0m 1;36mumount0m
1;36mash0m 1;36mdeluser0m 1;36mhostname0m 1;36mmore0m 1;36 msed0m 1;36muname0m
Everything has 1;36m and 0m at the beginning and end, respectively. I'm curious as to what it means, and more importantly, how to get rid of it.
You are trying to mount a local partition, right? I have never seen such device designations. Usually, its /dev/hda1 (first partition, first ATA hard drive) or /dev/sdb2 (second partition on the second SCSI hard drive).
Originally posted by DJ P@CkMaN What shell are you running? That looks like your colours are screwed. Edit ~/.bashrc and remove the ls alias for a temporary solution.
Why haven't I thought of this...
1;36 is the code for the cyan color.
It's the default color for soft links. (at least in slack).
I think DJ P@CkMaN is right.
Instead of removing the ls alias try this first:
Code:
\ls /bin
If you see the files uncolored and without having code in the beginning, DJ P@CkMaN's theory is correct.
Last edited by perfect_circle; 03-26-2005 at 12:09 AM.
Unfortunately, I did try your trick and everything is still listed as so. I'm also not quite sure where the .bashrc file is located. I also believe i'm running bourne shell.
Thanks again
Joe
Last edited by Mr Smokin Joe; 03-26-2005 at 11:04 AM.
Originally posted by Mr Smokin Joe Unfortunately, I did try your trick and everything is still listed as so. I'm also not quite sure where the .bashrc file is located. I also believe i'm running bourne shell.
Thanks again
Joe
I don't get it....
I don't know if the \ before a command is only for bash, but it's supposed to run the real command (ls)
ignoring any existing allias.
The .bashrc is in the home directory of the user, but not all distros use it. Slackware only use ~/.profile (for each user) and
/etc/profile (for all users).
What distro are you using?
What is the output of this:
Code:
echo -e "\033[1;36mhello\033[0m"
If you get an error thy the command without the -e
Also, can you post us the output of printenv command?
you made a mistake: that's not echo -e "/033[1;36mhello\033[0m" but that's echo -e "\033[1;36mhello\033[0m"
and if it works, it should print hello in cyan color
and if printenv does not work, try env command
You might be using sh, and then again, you might not. Many distros symlink /bin/sh to /bin/bash. To verify, do this:
ls /bin/sh
If your output looks like this: /bin/sh -> bash, then you are using bash.
Originally posted by bigrigdriver You might be using sh, and then again, you might not. Many distros symlink /bin/sh to /bin/bash. To verify, do this:
ls /bin/sh
If your output looks like this: /bin/sh -> bash, then you are using bash.
That makes sense. In fedora sh is a link to bash, but I don't know how old your distro is.
ALso u need to do
Code:
ls -l /bin/sh
to get the long format output.
In SuSE the ls for root is an allias to ls -la....something I think.
This is why a simple root ls outputs in long format, including hidden files.
Originally posted by perfect_circle
Why don't you just time bash in the console to see what happens with the colors.
Code:
$ time bash
time: cannot run bash
Command exited with non-zero status 127
real 0m 0.01s
user 0m 0.00s
sys 0m 0.01s
Well, an interesting this happened today when I booted up the board, everything works fine, heh. All the colors are correct and no crazy syntax is present everywhere:
Code:
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 7 Mar 1 2005 /bin/sh -> busybox
I Appreciate all the help i got, learned quite a bit in the process and I'll be probably seeing you all back on here soon.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.