Monday, November 22, 2010

Linux basic commands. Help!!?

I just started learning linux and im stuck to some questions.

I have already created a directory called 'learning/data' and im in this directory. Now the questions im stuck to is as follows:



1. Copy ur own .bash_profile to learning/data as a file called my_profiles using relative paths.



2. Without changing directory, make a file called rev4.txt in your login directory.



3. Whilst in learning/data make another directory called bin



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



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



6. Which cmd will allow u to see the attributes of ur current and parent directory and what is the command u issued?Linux basic commands. Help!!?
So you're doing a course and you havent bothered to read the textbooks or handouts, or you havent bothered to attend the relevant lecture?



do.your.own.homework.!!!!!!



All this information is available via google anyway.



You cnt use google but you reckon you want to use Linux?!Linux basic commands. Help!!?
Hi,

As 16k-zx81 has told u r just trying to get ur work done from someone else ..

But still i ***** resist myself from answering this question. Here u go:

1) assuming u r already in %26lt;usr_root%26gt;/learning/data -

------ cp ../../.bash_profile .

2) again assuming ur login directory is %26lt;usr_root%26gt;

------ touch ../../rev4.txt

3) md bin

4) ok this 1 is a bit tricky .. actually its been more than 2 yrs since i have seen a unix/linux screen itself .. but still lemme try

------ vi ../../.kshrc (or it cud b .bshrc based on the flavor of linux u r using) -%26gt; then find the PATH attribute and append this directory path there. Save and exit out of vi.

------ . ../../.bash_profile [this will force ur shell to again reset env but this time it will refer to ur modified .kshrc]

5) I didn't exactly get ur question but still my guess for an answer is:

------ echo $PATH

6) ls -lrt (for current dir)

ls -lrt ../ (for parent dir)



Regards,

Narahari

No comments:

Post a Comment