![]() |
Directory listing script?
I need a script that will scan on a webserver for all the sub-directories on a given directory, and will write itMs path in a *.txt file.
Does anyone knows any? |
anyone knows any?
|
Here you go.
#!/usr/bin/perl @dir = (`du`); open (list,">list.txt"); foreach (@dir) { print list; } close(list); put in a file and drop it in your starting directory launch with: perl file, through ssh or whatever :-P. |
I need to put this perl file in a *.pl or *.chgi file, in the category I want it to list....with a *.txt file that I chmod to 777, right?
The problem is that I cannot put perl files outside the cgi-bin directory... :( |
If you run this through ssh or telnet then it doesn't matter wether you name it .pl .cgi. or whatever, you should just put it in a file and then put the file in a starting directory, and make sure the script can create a file in that starting directory, and then type: 'perl file.pl', without the quotes, list.txt will then be created with the directories and stuff.
|
can I load it with IE?
I cannot connect to that server with ssh right now, and my tech is not here. |
| All times are GMT -7. The time now is 08:14 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123