LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-08-2007, 12:43 AM   #1
phobos0001
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Rep: Reputation: 0
just started learning linux


hi everyone,

My name's Daniel, im 21 andi live in Victoria, Australia and i started learning linux a couple of weeks ago and im still trying to get back into the swing of mucking around in command line rather then GUI... which i havent done since the old DOS days...so its been a while
im using SUSE 10.1 and i got it installed and created another user other then root so i dont kill something accidently.

im running through the basics of linux and have managed to aquire a couple of worksheets from a mate, unfortunatly i havent managed to get a copy of the matching text book yet so i was hoping i could get some help with a couple of the questions

the first major one giving me issues was "change your prompt to display the words testing followed by the user's username followed by the full path of the working directory"
and the second part of the question was place the current prompt into a file called "newprompt"


there are a couple of other questions that im having trouble with but i dont want to push my luck, thanks for reading and any help, links or constructive critisisim is greatly apriciated.

cheers, Daniel
 
Old 06-08-2007, 01:22 AM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
The login prompt is handeled by PS1 variable. To get the above variable you could try to put:
Code:
PS1="testing:\`whoami\`:\`pwd\`$ "
in you .profile or wherever it goes in SuSE.

And to put the current promt to file:
Code:
echo $PS1 > newprompt
 
Old 06-08-2007, 07:52 AM   #3
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
http://www.linux.org/docs/ldp/howto/...WTO/index.html
 
Old 06-09-2007, 07:11 AM   #4
phobos0001
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
cheers guys, that is quite helpful, much apriciated.

thanks for helping and not flaming, you guys rock!
 
Old 06-09-2007, 07:47 AM   #5
phobos0001
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
j just had another question, although this might seem stupidly basic to some...

i dont have access to a CD burner so i wan to know if its possible to boot knopix from a usb/flash drive rather then a "live-CD"? or is there another way to use it? ive only got linux at a mate's house but i want to spend more time with it because it seems like a pretty good OS, i just need more time to learn the basics
 
Old 06-09-2007, 08:07 AM   #6
phobos0001
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
i have 2 questions reguarding my worksheet that im still having trouble finding the answers to, but im still looking for better info.

the mkdir command that i cant find an answer to as of yet,
is it possible to create three directorys one inside the other in a single command that would give a structure such as this?...

foldera
-folderb
-folderc

the second question reguarding the rm command, now if i want to remove all files in a given directory that begin with say for example "e" i would type in [rm e] right?

how would i remove all NON-hidden files in a directory, for example home directory accept for one particular directory without conformation? and is it possible to do this in a single command?

ill apologise for all of my spoon feeding requests and i promise this is the last of them as im at the end of my final worksheet and have nothing but revising to do. thanks once again

incase any other noobs like myself are reading this i found a pretty good site for basic commands here
http://www.fsid.cvut.cz/cz/U201/LINUX.HTML

Last edited by phobos0001; 06-09-2007 at 08:09 AM.
 
Old 06-09-2007, 08:46 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
the mkdir command that i cant find an answer to as of yet,
is it possible to create three directorys one inside the other in a single command that would give a structure such as this?...

foldera
-folderb
-folderc
"mkdir -p"
This creates all the directories in the path if they do not exist. e.g.:
mkdir -p main/sub/sub main/sub-1/sub
Try it and it becomes obvious.....
 
Old 06-10-2007, 09:54 AM   #8
phobos0001
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
sweet, thanks pixellany, ill have a play around with it
 
Old 06-10-2007, 10:00 AM   #9
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
I think you'll find the man command quite useful.

man <command>
 
  


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
Learning Linux. madmantm Linux - General 6 04-21-2006 12:13 PM
Learning linux. Throntel Linux - Newbie 4 01-08-2006 05:14 PM
Hi guys, need a little help!!!!!Just started learning C MoeedK Programming 4 08-10-2005 08:41 PM
Learning how to use linux Derek-kun Linux - Newbie 5 09-07-2003 11:04 PM
Learning Linux ParamPuneet23 Linux - General 2 03-29-2001 09:01 AM


All times are GMT -5. The time now is 12:40 PM.

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