LinuxQuestions.org
Visit Jeremy's Blog.
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-13-2003, 11:23 AM   #1
loran
Member
 
Registered: Jan 2003
Posts: 121

Rep: Reputation: 15
Today' Stupid Newbie Question


Ok, in Mandrake ai was able to open a console and skip around my directory tree. (Confused yet?) In slack though, I get a BASH window and it wont let me do anything but run executables (like pkgtool, for instance)

Here's what I'd like to do: Go to the directory where I have my TGZs located and tar -xzvf them. NOWATIMEEN?
 
Old 03-13-2003, 01:08 PM   #2
CrAZy_MoNKeY
Member
 
Registered: Mar 2003
Posts: 64

Rep: Reputation: 15
do you mean that comands like ls and cd are not working?
 
Old 03-13-2003, 01:41 PM   #3
loran
Member
 
Registered: Jan 2003
Posts: 121

Original Poster
Rep: Reputation: 15
nope. I know I'm new but I'm pretty sure I can't cd into other directories. Just this...
"bash-2.05a#"

I can't cd, dir,or anything else except executables; they work pretty good.
 
Old 03-15-2003, 04:04 AM   #4
CrAZy_MoNKeY
Member
 
Registered: Mar 2003
Posts: 64

Rep: Reputation: 15
check that you havn't accidentaly done anythig to your /bin directory where these commands are found.
 
Old 03-15-2003, 04:15 AM   #5
rmartine
Member
 
Registered: Dec 2002
Location: San Luis Obispo, CA
Distribution: Fedora Core 3
Posts: 618

Rep: Reputation: 30
Oh man... If you hosed your /bin directory you wouldn't even get a bash prompt since the shell lives in /bin/sh. Assuming you had a shell open when you hosed it cd would still work since that is actually a script and not a binary. Sooooo...... I don't get it either.

To make you feel better though... I once was trying to remove a local bin directory where I had some school work and shell scripts sitting. For some reason I typed rm -rf /bin instead of rm -rf bin/. I was logged in as root. Damn that sucked.

Last edited by rmartine; 03-15-2003 at 04:19 AM.
 
Old 03-15-2003, 06:56 AM   #6
yngwin
Member
 
Registered: Dec 2002
Location: China
Distribution: Arch
Posts: 359

Rep: Reputation: 33
That's weird. Maybe you could try to login as root at startup time, see if the commands work then.
 
Old 03-18-2003, 01:02 PM   #7
loran
Member
 
Registered: Jan 2003
Posts: 121

Original Poster
Rep: Reputation: 15
root gives me the same thing. What can I do to fix this? HHHHEEEEELLLLPPPP!!!!!!!
 
Old 03-18-2003, 01:20 PM   #8
rmartine
Member
 
Registered: Dec 2002
Location: San Luis Obispo, CA
Distribution: Fedora Core 3
Posts: 618

Rep: Reputation: 30
Sorry.. but I should have asked you this from the beginning. What does the bash tell you when you try to cd, ls, or mkdir?? If you're getting command not found then maybe /bin was hosed. The problem there is that if you can open a prompt /bin is ok since bash lives in /bin. If it does absolutely nothing and gives you a new line like nothing happened then I have no idea.
 
Old 03-18-2003, 01:45 PM   #9
loran
Member
 
Registered: Jan 2003
Posts: 121

Original Poster
Rep: Reputation: 15
cd does nothing,
ls says "Desktop MPlayer-0.90rc5.tar.bz2 dload.html dload_files"
mkdir says "mkdir: too few arguements Try 'mkdir --help' for more information."

When I try to cd Desktop, or cd /Desktop, or anything simi;ar I get "No such file or directory"
 
Old 03-18-2003, 02:19 PM   #10
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
Quote:
Originally posted by loran
cd does nothing,
Your syntax is wrong. Try loggin into bash prompt as your user. You'll automatically be located in /home/loran. From here, if you type ls you'll get what you see in your /home/loran directory like you said you did. At this point, type cd /etc. You'll now be in the /etc directory. If you type ls again, you won't see the same information as before.

Quote:
ls says "Desktop MPlayer-0.90rc5.tar.bz2 dload.html dload_files"
This is the contents of your /home/loran directory

Quote:
mkdir says "mkdir: too few arguements Try 'mkdir --help' for more information."
Have you tried typing mkdir --help? If you had, you would've noticed that you have to type the name of the directory you want to "make" after mkdir

Quote:
When I try to cd Desktop, or cd /Desktop, or anything simi;ar I get "No such file or directory"
I have no idea why--unless the current directory does not have a subdirectory called Desktop, and if you just type "cd /Desktop", it is trying to find a directory called Desktop under the main root (/) partition. You'd have to type out /home/loran/Desktop. After you log in, type: cd / to get to the main root partition, then type ls to see what's in it. From here you can move around the directory tree with cd as you see fit.

man cd

for details. Hope this helps.
 
Old 03-18-2003, 02:20 PM   #11
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Sounds to me like it's working OK... ??

cd by itself will appear to do nothing, because no different directory was specified to change to.

mkdir with too few arguments is correct--mkdir by itself should do nothing

the output of the ls command looks OK

My guess is that there's no directory actually called "Desktop" so it's impossible to cd to it.
 
Old 03-18-2003, 02:40 PM   #12
loran
Member
 
Registered: Jan 2003
Posts: 121

Original Poster
Rep: Reputation: 15
ok, I think I might see what has happened...I'm used to seeing the current directory as part of the promt. Kind of tells you where you are, right? Ok, I 'm not getting that in Slack for some reason so it's hard for me to see where I am.

At the "bash-2.05a$" prompt, I enter "ls" (why dir doesn't work, I don't know) and I get what I told you before.

Then I enter cd /etc---no change in the prompt but when I "ls" I get a bunch of new stuff. New directory, right?

I thought the different Distros all acted pretty much the same but this is getting ridiculous!

Alright, let me wrangle with this for a little while.. Look for an update if I'm still lost. Thanks, Y'all.
 
Old 03-18-2003, 03:11 PM   #13
joesbox
Member
 
Registered: Feb 2003
Location: hampton va
Distribution: ubuntu
Posts: 502

Rep: Reputation: 30
open a terminal and type this pwd this will tell you where you are.

here are some commands for shell that will help you out:
$ cd / will take you to root files
$ cd .. will take you up one dir in the file tree
$ cd ~/ will take you to your home dir i.e. /home/joe
$ pwd will tell you where in the file tree you are i.e. /var/www/html/images
$ ls will list all unhidden files and folders in the dir you are in
$ ls -a will list all hidden/unhidden files and folders in the dir you are in
$ ./executable will run the executable that you point too in the dir you are in
$ man <command> will give you a manual on the command that you list i.e. man ls or man cd
$ mkdir <dirname> will make a directory(folder) with the name that you specify in place of <dirname>
$ rm <filename> will remove file with the name that you specify in place of <filename> !!!!!WARNING!!!! this is a very dangerous command. be careful not to use $ rm -rf / this will remove everything in the root directory which is everything on your harddrive. there is no recycle bin in linux.

hope this helps some.

===
update
===

not all distros will set up your terminals the same and all terminals are not set up the same. xterm will display differently then eterm which will display differently than kterm which will .... and so on and so on.
there is a way to display where you are in the prompt but that is in the settings. i am not familiar with doing this so you will have to ask someone else.

Last edited by joesbox; 03-18-2003 at 03:14 PM.
 
Old 03-18-2003, 03:33 PM   #14
joesbox
Member
 
Registered: Feb 2003
Location: hampton va
Distribution: ubuntu
Posts: 502

Rep: Reputation: 30
here is a HOWTO for bash

http://www.dreaming.org/~giles/bashp...wto/book1.html
 
Old 03-18-2003, 04:39 PM   #15
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
It depends how the prompt is setup. Do "echo $PS1" whereever you have your favourite prompt, make a note of what it is, then put export PS1="whatever" into your startup scripts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
stupid newbie question aznboi12321 Fedora 3 03-01-2005 12:10 PM
Stupid Newbie with simple question... tufkid Linux - Newbie 11 12-25-2004 10:40 PM
a stupid question, but i am a newbie !!! timmy toad Linux - Newbie 2 09-20-2003 01:36 PM
Stupid Newbie Question Shadowman2oo3 Linux - Newbie 2 08-27-2003 06:55 PM
Another stupid newbie question linuxchick Linux - Newbie 1 03-01-2002 06:49 AM

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

All times are GMT -5. The time now is 07: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration