how to create a script that can goto different dir and also to run prompts
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
how to create a script that can goto different dir and also to run prompts
Hi,
I need to know how I'll be able to write a script that can goto a different dir where I don't have access to read,write and execute and also to run a commandline prompt in that dir with one file whose path has to be specified in that command.
Re: how to create a script that can goto different dir and also to run prompts
Quote:
Originally posted by ann124 Hi,
I need to know how I'll be able to write a script that can goto a different dir where I don't have access to read,write and execute and also to run a commandline prompt in that dir with one file whose path has to be specified in that command.
some of us call this "hacking"............you need to learn how to do this on your own............
sorry ann124, but 320mb gave you a real answer.
do you expect what ? a + b => c .... LOL ....
this is hacking. this is the "art".
you need to find by yourself.....
If you've got the rights to enter a directory, you don't need a script to change directories, you type cd <directory>. Now if you don't have the rights, you would probably su and change permissions.
Interesting side note, I don't think scripts ever actually move you. I can have a script that moves all around the place installing stuff for me (which is actually how I install a lot of programs) and when I'm done, *I* haven't moved anywhere. Or if I have, it returns me to whatever directory I started in, so effectively I don't move.
Out of curiosity, what's the purpose of what you want to do? Unless you've got an inept admin, you probably have no need to do anything beyond the scope of your permissions. Anyway, if you absolutely have to get to the files, you can load a Knoppix.
My say on hacking, in tradition of the previous posters: 1) Do nothing malicious. That makes it harder for the community to gain any respect in the eyes of the nontechnical world, and hacker becomes a bad word. 2) If you're out to learn a lot, I would suggest reading manuals like crazy and understand what's going on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.