LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   just started learning linux (https://www.linuxquestions.org/questions/linux-newbie-8/just-started-learning-linux-560112/)

phobos0001 06-08-2007 12:43 AM

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

Zmyrgel 06-08-2007 01:22 AM

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

masonm 06-08-2007 07:52 AM

http://www.linux.org/docs/ldp/howto/...WTO/index.html

phobos0001 06-09-2007 07:11 AM

cheers guys, that is quite helpful, much apriciated.

thanks for helping and not flaming, you guys rock!

phobos0001 06-09-2007 07:47 AM

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

phobos0001 06-09-2007 08:07 AM

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

pixellany 06-09-2007 08:46 AM

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.....

phobos0001 06-10-2007 09:54 AM

sweet, thanks pixellany, ill have a play around with it

masonm 06-10-2007 10:00 AM

I think you'll find the man command quite useful.

man <command>


All times are GMT -5. The time now is 10:02 AM.