LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-25-2005, 07:32 PM   #1
Mr Smokin Joe
LQ Newbie
 
Registered: Mar 2005
Distribution: Debian
Posts: 28

Rep: Reputation: 15
Questions about what 'mount' does


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.

Thanks,

Joe
 
Old 03-25-2005, 10:46 PM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
What shell are you running? That looks like your colours are screwed. Edit ~/.bashrc and remove the ls alias for a temporary solution.
 
Old 03-25-2005, 11:50 PM   #3
tisource
Member
 
Registered: Feb 2002
Posts: 322

Rep: Reputation: 30
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).
 
Old 03-26-2005, 12:06 AM   #4
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
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.
 
Old 03-26-2005, 10:29 AM   #5
Mr Smokin Joe
LQ Newbie
 
Registered: Mar 2005
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
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.
 
Old 03-26-2005, 11:24 AM   #6
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
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?
 
Old 03-26-2005, 11:53 AM   #7
Mr Smokin Joe
LQ Newbie
 
Registered: Mar 2005
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Running Red Hat.

Here's the first output:

Code:
$ echo -e "/033[1;36mhello\033[0m"
/033[1;36mhellom
And unfortunately, here's the second output:

Code:
$ printenv
-sh: printenv: not found
Thanks for all the help

Joe
 
Old 03-26-2005, 01:51 PM   #8
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
hello,

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

Oliv'
 
Old 03-26-2005, 02:03 PM   #9
Mr Smokin Joe
LQ Newbie
 
Registered: Mar 2005
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Code:
$ echo -e "\033[1;36mhello\033[0m"
;36mhellom
and

Code:
$ env
USER=root
HOME=/root
LOGNAME=root
TERM=linux
PATH=/usr/sbin:/bin:/usr/bin:/sbin
SHELL=/bin/sh
PWD=/root
Hope this works out. Thanks for the help again and again....

Joe
 
Old 03-26-2005, 03:55 PM   #10
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
Old 03-26-2005, 04:51 PM   #11
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
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.
 
Old 03-26-2005, 05:30 PM   #12
Mr Smokin Joe
LQ Newbie
 
Registered: Mar 2005
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
[/CODE]$ ls -l /bin/sh
lrwxrwxrwx 1 root root 7 Mar 1 2005 1;36m/bin/sh0m -> 1;32mb usybox0m[/CODE]

The distro should not be very old at ALL, I just bought this board last week, and the version of Red Hat it came with should be the most up-to-date.

Joe
 
Old 03-26-2005, 05:46 PM   #13
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
Originally posted by Mr Smokin Joe
[/CODE]$ ls -l /bin/sh
lrwxrwxrwx 1 root root 7 Mar 1 2005 1;36m/bin/sh0m -> 1;32mb usybox0m[/CODE]

The distro should not be very old at ALL, I just bought this board last week, and the version of Red Hat it came with should be the most up-to-date.

Joe
busybox....
I had to search the net to see what this thing is.
Why don't you just time bash in the console to see what happens with the colors.
 
Old 03-27-2005, 06:36 AM   #14
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
busybox: that's a sort of tiny bash... it's widely used in embedded systems with µlibc (or at least light libc)
 
Old 03-27-2005, 12:13 PM   #15
Mr Smokin Joe
LQ Newbie
 
Registered: Mar 2005
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
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.

Thanks a million,

Joe



Joe
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
3 mount questions aze Linux - Software 8 01-29-2005 04:33 PM
How to mount cdrom? And another questions hemmelig Linux - Software 5 12-15-2004 03:50 AM
mount questions 1racerx Linux - Newbie 4 10-05-2004 07:09 AM
HD Mount and Partition Questions grcbheax Linux - Newbie 1 08-11-2004 09:05 AM
mount questions ..... purpleburple Linux - General 7 08-07-2002 09:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration