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.
i'm writing a shell script which backs up data held in a mysql db, and ftp uploads it to a server. this works perfectly so far.
i plan to set this up as a cron job so it runs daily. however, i don't need to keep all the previous files containing exported data - i only need to keep, say, that last week or fortnights worth of files.
I'm no expert, but maybe do something like ls backup-$date.sql just before bye, and then use an if statement to check if ls provides any output. Would be nice for you to share it once you've completed it though
Originally posted by tomj88 ...but maybe do something like ls backup-$date.sql just before bye, and then use an if statement to check if ls provides any output....
problem is that between the END-OF-SESSION labels everything is treated as a ftp input. i can ls to get the output (or nothing if the file hasn't been uploaded) but then i dont know how i would go about checking this, because i am still in the ftp session
OK, but it looks like that mls might work I did have a perl based mysql backup program but that was bloated... If you want I could try and find that but as I said it was bloated, it would backup to tar.gz files, would email you if you wanted to, could ftp, and you could enable/disable all the options if I remember
i'll have a go using mls first see if that works nicely or not.
at the end of the day my code works perfectly, it just lacks some error handling - its only a small script to set up as a cron job so it'll be fine, but if i can get mls working to keep a log of uploaded files that would be handy!
cool, I'm having a look at that perl script, it's very well commented but has a fair few options. If your script works then I would advise using it because if it breaks, you know how to fix it . Hope mls works...