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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am having problems opening this script on my machine. i have been getting help from a very helpful person on this list.
I have checked the shebang line, that perl exists, and perl -v gives proper output.
i try to run the script below as follow:
[root@cctv httpd]# cd cgi-bin
[root@cctv cgi-bin]# ls -la
total 28
drwxr-xr-x 2 me root 4096 Mar 5 21:49 .
drwxr-xr-x 5 me root 4096 Mar 3 01:50 ..
-rwxr-xr-x 1 me root 268 Mar 4 13:50 printenv
-rwxr-xr-x 1 me me 1792 Mar 5 15:20 renamer
-rwxr-xr-x 1 me me 1788 Mar 4 16:40 renamer.cgi
-rw------- 1 root root 1731 Mar 5 21:49 renamer.pl
-rwxr-xr-x 1 me root 757 Mar 3 01:50 test-cgi
[root@cctv cgi-bin]# renamer.pl &
[1] 10254
[root@cctv cgi-bin]# bash: renamer.pl: command not found
thanks, for the help.
when i run the script i get an error with the script it self, could you help me out? tell me if you would, so i could show you the very basic script?
#The above instructs renamer to look for files called image.jpg in /home/httpd/htdocs.
#It checks once per minute for such a file to appear. If it sees a
#readable file called /home/httpd/htdocs.jpg it moves it to
#/home/httpd/htdocs/image.200302251530.jpg where the number is a
#time stamp with year (four digits), month, day of the month, hour (in
#24 mode), and minute.
#Read the bugs section closely.
=head1 BUGS
#The original and new directories must be on the same file system.
#The program probably does not work on windows systems.
#The daemon behavior is weak.
#Not much testing has been done, so the script may have other problems.
You said there was an error.... Is there an error message? If not, what is the script actually doing (if it's not renaming to date format as you wanted it to)? If the script is running in the background, how did it get started running if you didn't start it running?
I assume you solved the earlier problem with execution permissions?
Did you write this script, or did you get it from somewhere else? If you wrote it, perhaps it would be good to consult a perl reference.
I dont know which command set it running, but could someone please explain how to stop it, and run it again!!!
yeh thanks the execution permission problems are now solved.
The script i got from a mailing list, i did some basic changes to it. but not too sure on how to do the extra changes.
The script is to simply take an image named image.jpg from /home/httpd/htdocs and rename it with the date of the image, and move it to /home/me/images.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.