Saturday, November 20, 2010

Unix Systems homework help?

Hi, I need some help with the follow questions. Any help would be great!



1. In your login directory, make a directory called week4/revision



2. Without changing directories, make another directory week4_revision/data



3. Change to week4_revision/data in one command



4. Copy your own .bash_profile to week4_revision/data as a file called my_profiles using relative paths. [Remember you are now in /student/sxxxxx/week_revistion/data]



5. Copy the password file from /etc to week4_revision/data using absolute paths



6. Without changing directory, make a file called rev4.txt in your login directory. [Remember you are now in /student/sxxxxx/week_revision/data]



7. Whilist in week4_revision/data make another directory called bin



8. Add this directory to your PATH variable such that is will still be valid when you next login, then force shell to acknowledge this change for this session



9. How can you tell that the shell has observed the change?



10. Which command will allow you to see the attributes of your current and parent directory and what is the command you issued?



11. Apart from vi, which other commands (there are at least 2) will allow you to see the contents of .bash_profile



12. How many ways can you think of to return to your login directory? What are they?



13. Return to your home directory using the most efficient command



14. Which command will remove the directory week4_revision (do not remove it though) ? [There are still files in this directory].



15. Change week4_revision to week4_revision.old



16. Will this affect your path statement? If so, how?



17. Which meta characters are valid with the ls command?



18. What does ls -alt do?



19. Which command will make four directories da db dc dd in one command?



20. Which command will remove only the three directories da db dc in one command but only using one argument?



Thanks for your help, I have a test coming up and I am behind so the answers will help me study.Unix Systems homework help?
1. In your login directory, make a directory called week4/revision

mkdir -p week4/revision



2. Without changing directories, make another directory week4_revision/data

mkdir -p week4_revision/data



3. Change to week4_revision/data in one command

cd week4_revision/data



4. Copy your own .bash_profile to week4_revision/data as a file called my_profiles using relative paths. [Remember you are now in /student/sxxxxx/week_revistion/data]

cp ../../.bash_profile my_profiles



5. Copy the password file from /etc to week4_revision/data using absolute paths

cp /etc/passwd /student/sxxxxx/week4_revision/data



6. Without changing directory, make a file called rev4.txt in your login directory. [Remember you are now in /student/sxxxxx/week_revision/data]

touch ../../rev4.txt



7. Whilist in week4_revision/data make another directory called bin

mkdir bin



8. Add this directory to your PATH variable such that is will still be valid when you next login, then force shell to acknowledge this change for this session

echo ';export PATH=/student/sxxxxx/week4_revision/data?%26gt;%26gt; ~/.bash_profile

source ~/.bash_profile



9. How can you tell that the shell has observed the change?

echo $PATH



10. Which command will allow you to see the attributes of your current and parent directory and what is the command you issued?





11. Apart from vi, which other commands (there are at least 2) will allow you to see the contents of .bash_profile

cat ~/.bash_profile

pico ~/.bash_profile



12. How many ways can you think of to return to your login directory? What are they?

cd

cd ~

cd $HOME



13. Return to your home directory using the most efficient command

cd



14. Which command will remove the directory week4_revision (do not remove it though) ? [There are still files in this directory].

rm -rf week4_revision



15. Change week4_revision to week4_revision.old

mv week4_revision/ week4_revision.old/



16. Will this affect your path statement? If so, how?

No, but the path to renamed directory will become invalid.



17. Which meta characters are valid with the ls command?

*

?

~



18. What does ls -alt do?

a; list hidden files and directories

l; long listing in an 8 column format

t; list files in the order of their modification dates



19. Which command will make four directories da db dc dd in one command?

mkdir da db dc dd

mkdir -p da/db/dc/dd



20. Which command will remove only the three directories da db dc in one command but only using one argument?

rm -rf d[a-c]Unix Systems homework help?
Wow. You better get busy if you're behind.



You're kidding with these questions, right? Someone in the first day of a Unix class could answer all of these. If you can't, you need to drop the class now.
Why are you in that class if you can't even answer these questions? I think it's time you re-evaluate your goals and direction for your education!



Good luck in dropping your class and signing up for ';basket-weaving 101';, because it's rather late in the season to drop a class, but who knows - maybe they might make an exception for you this one time.
  • iis web server
  • clipping nails dry
  • No comments:

    Post a Comment