Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
The 100104 would be the current date each day. I have not been able to figure out what command to use to get the current date from my box, so I can't figure out how to do that part of this cron job. I just figured out how to write a cron job today without asking for any help up to this point.
Will some one tell me what command will get the date and point me to some good information that will show me how to use it in my cron job or tell me a better way to do what I am trying to do?
should do it. For simplicity, you might want to put both commands into a shell script, and then have cron invoke that. And for your first cron command, unless you want it run every minute during the 4 AM hour, replace the first asterisk (before the 4) with a 0 (or whatever minute you want it to run at).
The directory was created like this - "serverbackup$(date" on the first pass
Then the second pass created another directory like this "+%m_%d_%y" inside "serverbackup$(date"
The files that were in serverbackup were moved to "serverbackup$(date"
I tried it by taking out the space between "date" and "+" so it looked like this $(date+%m_%d_%y) that created this "serverbackup$(date+%m_%d_%y)" then the files were moved into that directory and the second directory was not created. Doing this $(date+%m%d%y) did the same thing as the other.
Thanks for pointing out my mistake with the minute value.
I don't understand how to know or control what shell is being used.
I assume I am using the BASH shell. I start konsole in KDE and whatever shell is automatically started with that is what I am using. The man page for BASH is major information overload and very confusing. Google brings up sites that basically have the same information. I have not been able to find a tutorial that explains what the information in the BASH manual is saying. I will figure this out one way or another, sooner or later. This whole learning process with Linux has been very difficult but I won't stop because I like what I see and have learned so far. It sure beats using mswindows.
Thanks to all for trying to help. I am no closer to understanding this or getting it to work. The more I read to get my questions answered the more questions I have. I don't know how to make this work in the crontab. I can make it all work perfectly if I type it in at the prompt. I also have no idea how to make the crontab execute the commands from another file either. There is clearly something missing from my knowledge and understanding but I don't know what. At this point I am totally confused.