LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2004, 11:13 AM   #1
ann124
LQ Newbie
 
Registered: Nov 2004
Posts: 9

Rep: Reputation: 0
Question 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.

Will I be able to do this?

Any ideas or solutions are welcome.
 
Old 11-29-2004, 11:17 AM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
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............
 
Old 11-29-2004, 11:21 AM   #3
ann124
LQ Newbie
 
Registered: Nov 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks.
Can I have a real answer?
Please.
 
Old 11-29-2004, 11:37 AM   #4
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

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

regards
slackie1000
 
Old 11-29-2004, 12:37 PM   #5
ann124
LQ Newbie
 
Registered: Nov 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Alright ,I understand.

Consider I've the rights to access the dir,If so what can be done?

Thanks
 
Old 11-29-2004, 12:48 PM   #6
Chrax
Member
 
Registered: Apr 2004
Distribution: Dapper
Posts: 167

Rep: Reputation: 31
I'm not fully understanding what you're asking.

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.

Anyway, class time. Later.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
goto in linux shell script sabliny LinuxQuestions.org Member Intro 1 10-13-2005 03:00 PM
can you use goto in bash script sabliny Programming 3 10-07-2005 05:54 PM
Have to create a dir. each time I use CD-ROMs samael26 Debian 3 06-04-2005 01:08 PM
Help to create a script to open a terminal and run commands in it. Brian1 Linux - Software 6 02-07-2005 06:46 PM
Run script during file copy or create in directory neranjana Linux - General 1 01-13-2004 06:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration