November 25, 2024, 04:06:10 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Help me  (Read 12814 times)

Offline longyenthanh

  • New Member
  • Posts: 2
Help me
« on: September 06, 2012, 02:52:14 AM »
I just start learning about linux. Here is a exercises of the lesson. Does anyone help me write down the command? I am having some problem. Linux is sound new for me :( and because I took the class online and I missed one day. Anyone help me pls. Thank you

1. Login to shell as student

2. Change your prompt to match the following: [yourname]#

3. Export your new prompt to the other shells

4. Make new prompt permanent

5. Change directory to /home/student

6. Create a new directory named yourname

7. Do a directory listing to make sure that new directory is present

8. Change to new directory

9. Print working directory

10. Create new file called: classes.txt

11. Edit new file to enter the list of classes you are currently taking

12. Change directory to /

13. While in root directory print the contents of your new file (classes.txt) to the shell output by prepending the path

14. Add the new folder you created in step 6 to PATH

16. Find any files in your system ending with .txt

17. Find path to the manual pages of tail command

Offline dalek

  • LST CareTaker
  • Crescent
  • *****
  • Posts: 243
Re: Help me
« Reply #1 on: September 06, 2012, 12:45:45 PM »
Maybe I can help on some of this. 

1:  Type in user name and password.  Should be simple enough.  Remember, BOTH are usually case sensitive.  It has to match perfectly or it will not accept it. 

2,3,4:  Link to a page that talks about all this.

http://www.ibm.com/developerworks/linux/library/l-tip-prompt/

5: cd /home/student

6: mkdir yourname

7:  ls yourname  That is a lower case version of LS.  It's short for list. 

7a:  you could also just do a ls too. 

8: cd yourname

9:  Not sure what they mean.  The ls command prints it to screen.  If they want it printed to a printer on paper, can't remember off the top of my head.  It's been a while since I did that.  lol

10:  touch classes.txt

11:  Depends on editors installed.  Could be vi, nano or some other editor.  It would go something like this:  command <file name>  Example:  nano classes.txt  OR  vi classes.txt   

If you are using vi, you better practice a bit because vi takes some getting used to.  I hope you have plenty of hair to pull out if it just doesn't click for you.  Some people can use it right from the start like a pro and some can't use it even after years of having too.  I fall into the later one.  I just can't get vi to work for me.  I use nano instead. 

12:  cd /

13:  cat /home/student/classes.txt

14:  Depends as I think it can vary from distro to distro. 

15:  What happened to 15?

16: You need to read up on the find command.  I use the GUI version.  You may not have that on yours. 

17:  Same as above.  Plus where to look can vary on distros too.  It's usually in /usr somewhere.  Mine is in /usr/share/man/man1/ but that can vary.  I think it used to be in /usr/doc or something a good while back.  May even depend on the distro too. 

Another tip.  Most systems have a thing called tab completion.  Let's say you are on the command line trying to recall a command.  If you know the first few letters, you can type them in then hit tab twice.  It will list all the matching commands.  Let's say the command is abcdefghijklmn.  Well, that is a bit long and unique.  Just type in abcd then hit tab twice.  If there is no other command that starts with abcd then it will fill in the rest.  If there are other commands that start with abcd, then it will list them all and you can pick from the list. 

Hope that helps.  I feel like I went back to school.  lol

 :)   :)

Offline dalek

  • LST CareTaker
  • Crescent
  • *****
  • Posts: 243
Re: Help me
« Reply #2 on: September 06, 2012, 01:07:40 PM »
It may be worth mentioning this.  Linux is all about learning.  You really need to learn all about man pages and such.  Learning to use google or some other search engine is a good idea too.  There will be times when a question or problem comes along and you don't have anything but you to rely on.  One example could be when you go to boot after a major update and it boots you to single user mode.  Generally, that means no internet or anything.  All you have is man pages and what you know in your head. 

:)  :)

Offline longyenthanh

  • New Member
  • Posts: 2
Re: Help me
« Reply #3 on: September 06, 2012, 01:17:11 PM »
Thank you very much :) I'm trying to do it. Hope my brain get it. I'm too old to begin studying programming lol. But Computer is my hobby. Will try to study hard