|
Pages: [1]
|
 |
|
|
Author
|
Topic: Episode 39 - Cron (Read 5428 times)
|
Chess
Administrator

Posts: 1069
|
In this episode: new logo submissions; taking a short break at the end of the year; O'Reilly's LPI Linux Certification in a Nutshell, Second Edition; a discussion of cron and crontab (additional resources here, here, and here); a Listener Tip on clearing Bash history; listener feedback. http://www.linuxreality.com/podcast/episode-39-cron/
|
|
|
|
|
Logged
|
|
|
|
|
jza
|
LPI is great, is a very distro agnostic certification, which means that what you learn here is aplicable to all distros. They do things like your talks, things like NFS, SMB, NIS, SSH, Web, etc.
There is 4 levels of certification: LPI 101, LPI 102, LPI 201, and LPI 202.
The guys from LPI are based in toronto and they were interviewed y TLLTS about a year ago. I know the guy in charge of LPI here in Mexico and also have the contacts with LPI US. They are usually giving the cert exam for free on Linux events such as Linux World.
I think this is the best certification for Linux, even better than Red Hat or Novell at the moment.
|
|
|
|
|
Logged
|
Alexandro Colorado OpenOffice Spanish Co-lead
|
|
|
Chris (ok)
Newbie

Posts: 6
|
Hey Chess and all else, First off...It was great to hear you read my confusing email on the podcast. That really wasn't my plan, but it was still GREAT! I figured you would have forwarded it to this forum or something else.
So I am running Ubuntu Breezy (ya Breezy, it runs great). I would love to have my Cowon U3 mount to the same spot everytime so that I can use cron and my bash scripts to mount and move podcasts. I have skimmed over the ubuntu help/forums and it just confused me more. There is a prevision for a LABEL but I am not sure how to find the label of my U3.
Any help would be wonderful.
Thanks for the podcasts Chess and keep it up.
Chris Oklahoma
|
|
|
|
|
Logged
|
|
|
|
Chess
Administrator

Posts: 1069
|
Chris - glad you posted! I did not realize you were using Breezy. Well, then you can ignore my rambling about how different Ubuntu is. I think those changes only came in with Edgy. So, anyway, I do think you can solve this problem by writing a custom udev rule to put in /etc/udev/rules.d. The file must be named something with .rules at the end, like 10-local.rules. The files in that directory are run in order, so if you want your custom rule to apply then you need to make sure it runs first, which is why so many people use the "10-local.rules" convention since the 10 will come before the alphabetical file names. Anyway... writing udev rules can be tricky. Here is the main site that explains it, but you may find it confusing: http://reactivated.net/writing_udev_rules.htmlThis looks like a good Ubuntu forum thread on writing a custom udev rule: http://www.ubuntuforums.org/showthread.php?t=168221&highlight=udev+rulesIf you read that first post carefully, I think you should be on your way.
|
|
|
|
|
Logged
|
|
|
|
thelastknowngod
Global Moderator

Posts: 2185
|
i just got done listening to this weeks show. after all this talk about bash podder i think im going to give it a shot when i do the slackware install. i cant wait for the slackware episode. ill probably be lost by the time it comes out but whatever.
thanks chess.
oh and to the guy who didnt know that was from the Holy Grail... you have not yet lived. haha. if you do nothing in your lifetime... see Monty Python and the Holy Grail. its that good.
|
|
|
|
|
Logged
|
|
|
|
|
KaosX
|
chess i recorded that little thing and it's done, i sent you a pm about it, just in case you didnt see.
|
|
|
|
|
Logged
|
|
|
|
Chris (ok)
Newbie

Posts: 6
|
Chess,
Thanks for the links to the udev information. I bet it will work. I have read some other posts elsewhere and got side tracked by the LABEL= option.
|
|
|
|
|
Logged
|
|
|
|
|
RichardBronosky
|
Maybe you could have a few listeners be guest podcasters. I liked the thing you did with the video editing episode with Pat.
Did he do the mixing, or just send you the recorded audio?
I realize that LR is your baby and tainting your brand with a boring, poor sound quality, or otherwise sub-standard episode is a frightening prospect, I just thought I bring it up.
|
|
|
|
|
Logged
|
 "I just can't figure out how you guys are making those cool look'n glassy buttons!"
|
|
|
|
KaosX
|
Id do one on Linux/Unix based firewall/router distro's like smoothwall, monowall, ipcop, pfsense etc..
Just a little overview on all of them, that would be fun.
|
|
|
|
|
Logged
|
|
|
|
|
RichardBronosky
|
Id do one on Linux/Unix based firewall/router distro's like smoothwall, monowall, ipcop, pfsense etc..
Just a little overview on all of them, that would be fun.
Did you hear the Linux Action Show episode on these? If by "I'd do one on..." you mean that you would be knowledgeable enough to guest host, then I'll join in by adding: If I were going to guest host an episode, I'd love to do one on GNU Screen. I think Screen is the most important advancement since SSH. It has literally saved me man-months since I started using it 2 years ago.
|
|
|
|
|
Logged
|
 "I just can't figure out how you guys are making those cool look'n glassy buttons!"
|
|
|
|
|
Chris (ok)
Newbie

Posts: 6
|
Chris - glad you posted! I did not realize you were using Breezy. Well, then you can ignore my rambling about how different Ubuntu is. I think those changes only came in with Edgy. So, anyway, I do think you can solve this problem by writing a custom udev rule to put in /etc/udev/rules.d. The file must be named something with .rules at the end, like 10-local.rules. The files in that directory are run in order, so if you want your custom rule to apply then you need to make sure it runs first, which is why so many people use the "10-local.rules" convention since the 10 will come before the alphabetical file names. Anyway... writing udev rules can be tricky. Here is the main site that explains it, but you may find it confusing: http://reactivated.net/writing_udev_rules.htmlThis looks like a good Ubuntu forum thread on writing a custom udev rule: http://www.ubuntuforums.org/showthread.php?t=168221&highlight=udev+rulesIf you read that first post carefully, I think you should be on your way. Well I tried the writing of the udev rules. And it seemed to work, it looked like it anyway. That is until the /dev/sdb changed to /dev/sdc. Rats!! So here is the work around that I came up with. I commented the /etc/fstab line out and deleted the udev rule. I wrote a little bash script that checks to see what /dev/sd? is present and then mounts it to /media/u3. I used the if [ -b /dev/sda ] then mount /dev/sda /media/u3 elif [ -b /dev/sdb ] then mount /dev/sdb /media/u3 elif...blah blah you get the idea. I dumped this script into my ~/bin directory and now just run this or use it in other scripts. I am not a bash scripting guru and I bet there is a better work around but this is working for me now. Thanks for everything, and I will keep listening, Chris Oklahoma
|
|
|
|
|
Logged
|
|
|
|
|
ultranoize
|
Hello Everyone. I really like the idea about automating things in Linux. Although I am new user, I'd love to install Ubuntu in my parents machine. I'm pretty sure they would be fine using it as long as the know which is the button the have to hit for internet and the button for Skype. The problem is that my parents live in Colombia and I live in Denmark which means that I really can't be a proper administrator since i won't be there. The question is if there is a way to automate the softaware updates. Maybe using a cron.tab weekly with the relevant commands for getting updates ? Any suggestions ?
|
|
|
|
|
Logged
|
SPP
|
|
|
|
bluepass
|
I think all you have to do is run "apt-get update" and once that's finished you'd do "apt-get upgrade" and it should automatically download and install all of the packages that have been updated.
As for the cron.tab, you'd first want to decide a time when your parents are going to have their machine on for the updating. If say you want to make this update every monday at 9pm, you'd just do something along the lines of:
0 21 * * 1 apt-get update ; apt-get upgrade
If you want to keep a log of what happened as well, in case something fails, you can simply redirect that to a log file and your parents can send that to you through email or something. I'm not sure if you have any knowledge of scripting but you could probably make a nice script to take care of this and also tell you whether there have been errors and such in your updating. In fact one of the things I'd do is use the 2> to redirect stderr output to a file -- then you can look over it and check if there were any problems. So that's:
0 21 * * 1 apt-get update 2> logfile ; apt-get upgrade 2>> logfile
I'm not able to test this since I'm running Gentoo and that uses another package management system, so I cannot guarantee that it will work for you, but it should do the job. Let me know how it goes.
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |