ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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
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 &
[root@cctv cgi-bin]# bash: renamer.pl: command not found
#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.
#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.