cancel
Showing results for 
Search instead for 
Did you mean: 

CGI Workaround: Nuking a folder tree

oliverb
Grafter
Posts: 606
Registered: ‎02-08-2007

CGI Workaround: Nuking a folder tree

Trying to clean up my cgi space I've found the results of an attempt to compile a perl XS module about 6 years ago. Unfortunately the folder tree has hidden content that ftp won't show. Any ideas on how I can remove it?
Oh BTW plan B is to back-up the stuff I want to keep and then disable and reenable the service to get a "clean slate".
4 REPLIES 4
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: CGI Workaround: Nuking a folder tree

Assuming you want to delete a complete sub-directory, you could create a bash script with header information that executes 'rm -r thatsubdirectory'. Transfer this to ccgi as type somename.cgi in the directory containing 'thatsubdirectory'; make the file executable and run it in your browser.
David
oliverb
Grafter
Posts: 606
Registered: ‎02-08-2007

Re: CGI Workaround: Nuking a folder tree

Yes, that did it, thanks.
To be sure I wasn't shooting in the dark I looked up how to make a bash script dump a HTTP header, and tried "ls" first to make sure I was in the right place.
Feels like I'm trying to fix a clock with an axe but my setup looks sane now, most of the cruft from old experiments has gone.
Now I just need to figure how to run an install script non-interactively.
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: CGI Workaround: Nuking a folder tree

Quote from: oliverb
Now I just need to figure how to run an install script non-interactively.

What type of install script is it? Presumably won't run interactively in a browser?
David
oliverb
Grafter
Posts: 606
Registered: ‎02-08-2007

Re: CGI Workaround: Nuking a folder tree

Its been a little while since I tried, so I''ve forgotten a lot of this stuff. I think there was a configuration script that asked a series of questions about your system. Quite a few tools seem to ask questions only if they hit something unexpected, and some will detect a non-interactive session and end with an appropriate report instead of waiting for input.
Mainly I'm concerned with Perl extensions that require "XS" sections. If I recall correctly I need to run a "makemaker" file followed by the actual "make install" job. Both should be fine with just command line parameters, though I have to remember the override to make it install "non-root". Its been about two years and I've forgotten how I did it before. Also plusnet's setup includes CPAN.PM which meant that once I creates a ".cpan" folder and a credible config file it would download and install an extension automatically, even if it had "c" code that needed to be built.
Next on my list is learning how to do "sessions". Currently both cgi:session and apache::session read like double-dutch to me.