Help - Search - Members - Calendar
Full Version: Any Linux Gurus Here?
Boostcruising.com > Computers and Technology > Tech Head Corner
Silly Silvia
Hi,
Basically are there any ubuntu linux gurus here who could possibly help me with a few tute exercises i have for uni.

I suck using the find command and scripting and one of the subject matters is using cron to automate the running of scripts.

Basically we have to:

Begin by writing a script that appends HINT: Use the >> redirector (logs) the current date and time
to the file /var/log/usrbin.log (use date with redirection), then appends a list of all files modified
in the last 5 minutes in the /usr/bin directory (use find with redirection), finally, append ------ to
the file, to separate that log entry from the next.

Can anyone help me with this script?

Im pretty sure i can figure out how to modify the system crontab so it runs every 5 mins or something like that.

cheers,
Ahmed
the red krawler
If you cant be arsed looking for some incredibly basic information, then I dont think Linux is for you. If this is part of an IT course, then I its probably best to consider another course. Theres enough shitty IT people out there passing themselves off as knowledgable experts already.

Silly Silvia
Thanks for your typical IT person response. I thought I would give it a try here as time is an issue. I know its pretty basic stuff, if I wanted to spend the time on it i would have. Don't worry I never intend to pass myself off as a knowledgeable expert in this subject matter I'm only doing this subject as its a core unit to finish off my degree and then I can do something else with my life.
wildwizard
If this is indeed a core unit for a degree and you can't figure out the answer for it in less than half an hour then I suggest you quit your degree now as you are most certainly not capable.

They basically told you what to do and what tools to use you just need to research the tools to find out how to use them.
CALIbrated
QUOTE (the red krawler @ Oct 3 2009, 12:52 PM) *
If you cant be arsed looking for some incredibly basic information, then I dont think Linux is for you. If this is part of an IT course, then I its probably best to consider another course. Theres enough shitty IT people out there passing themselves off as knowledgable experts already.

you dont have to be a linux guru to be an IT guru.

personally, i hate linux. but give me anything MS related (servers) and im happy. ps. i've done my linux courses, so i'm capable tongue.gif i just dont like using it, unless i have to. and ubuntu was developed in a garage 20km from where i used to live. biggrin.gif
PyrotiX
Have you heard of this thing called Google?

http://www.lmgtfy.com/?q=Google
the red krawler
QUOTE (CALIbrated @ Oct 5 2009, 01:36 PM) *
you dont have to be a linux guru to be an IT guru.


I would hardly call what OP requires "guru" material.

I was more referencing his/her complete inability to use their own initiative to source easily accessibly solutions to their problem. I would have thought basic problem solving - especially utilising a worldwide search of available documentation - to be a core skill of anyone who wants to claim any IT ability at all.

Correct me if I'm wrong. And personally I think hating Linux (et al) comes down to "hates having to do more than click pretty pictures". Dont bother correcting me on that part, cause I know Im right.
Chris
QUOTE (the red krawler @ Oct 5 2009, 03:44 PM) *
I would hardly call what OP requires "guru" material.

I was more referencing his/her complete inability to use their own initiative to source easily accessibly solutions to their problem. I would have thought basic problem solving - especially utilising a worldwide search of available documentation - to be a core skill of anyone who wants to claim any IT ability at all.

Correct me if I'm wrong. And personally I think hating Linux (et al) comes down to "hates having to do more than click pretty pictures". Dont bother correcting me on that part, cause I know Im right.

Clicking pretty pictures > Pressing clicky keys.
I can do that shit one handed.
Silly Silvia
QUOTE (the red krawler @ Oct 5 2009, 06:44 PM) *
I would hardly call what OP requires "guru" material.

I was more referencing his/her complete inability to use their own initiative to source easily accessibly solutions to their problem. I would have thought basic problem solving - especially utilising a worldwide search of available documentation - to be a core skill of anyone who wants to claim any IT ability at all.

Correct me if I'm wrong. And personally I think hating Linux (et al) comes down to "hates having to do more than click pretty pictures". Dont bother correcting me on that part, cause I know Im right.


I in no way shape or form said that this was guru material, its a simple script with simple output redirection and a fucking find command... Big whoop...

It would take someone all of 1 minute to type and save me the hassle of doing it myself. If i wanted opinions in my prospective career in IT i would have asked for that, but I didn't. I asked if anyone had the spare minute to write a simple bash script, you obviously have the time, but what you don't have is simple comprehension skills. You chose not to help, that's fine, now fuck off.
Mr.B
Speaking of ubuntu, how is it? I'm tempted to set up a virtual machine to run it one for a play around.
CALIbrated
QUOTE (Mr.B @ Oct 6 2009, 06:47 AM) *
Speaking of ubuntu, how is it? I'm tempted to set up a virtual machine to run it one for a play around.

i have 2 ubuntu cd's here if you want to try it out.
CALIbrated
QUOTE (the red krawler @ Oct 5 2009, 06:44 PM) *
I would hardly call what OP requires "guru" material.

I was more referencing his/her complete inability to use their own initiative to source easily accessibly solutions to their problem. I would have thought basic problem solving - especially utilising a worldwide search of available documentation - to be a core skill of anyone who wants to claim any IT ability at all.

Correct me if I'm wrong. And personally I think hating Linux (et al) comes down to "hates having to do more than click pretty pictures". Dont bother correcting me on that part, cause I know Im right.

yeah i know what you were getting at. smile.gif

google = technicians best friend

operating a linux machine is like slave labour, and im a lazy admin tongue.gif
the red krawler
QUOTE (Silly Silvia @ Oct 5 2009, 07:14 PM) *
It would take someone all of 1 minute to type and save me the hassle of doing it myself.


Youre going to go far.
the red krawler
QUOTE (Mr.B @ Oct 6 2009, 06:47 AM) *
Speaking of ubuntu, how is it? I'm tempted to set up a virtual machine to run it one for a play around.


Download a live CD from ubuntu.org and give it a whirl. It will run straight off the CD (lets see you do THAT, Windows wink.gif) and not change anything on your HDD in any way.

It will be slightly slower running off a CD than from HDD obviously, but not by much. Most hardware will be picked up straight off the bat (lets see you do THAT, Windows wink.gif) and from memory it comes packaged with Firefox and Pigin and an assortment of other programs installed so you can actually 'do stuff' to test it all out.

Its probably better to dual boot instead of virtual box if youre keen on it. But I'd keep Windows around for gaming. Linux sucks for games. DirectX sad.gif

If youre not into gaming, you can use windows in a virtualbox to run pretty much any other software, and the cool part is integrating the virtual box into your linux desktop - ie: you have a windows start menu on a linux desktop ohmy.gif
Mr.B
QUOTE (the red krawler @ Oct 6 2009, 10:34 AM) *
Download a live CD from ubuntu.org and give it a whirl. It will run straight off the CD (lets see you do THAT, Windows wink.gif) and not change anything on your HDD in any way.

It will be slightly slower running off a CD than from HDD obviously, but not by much. Most hardware will be picked up straight off the bat (lets see you do THAT, Windows wink.gif) and from memory it comes packaged with Firefox and Pigin and an assortment of other programs installed so you can actually 'do stuff' to test it all out.

Its probably better to dual boot instead of virtual box if youre keen on it. But I'd keep Windows around for gaming. Linux sucks for games. DirectX sad.gif

If youre not into gaming, you can use windows in a virtualbox to run pretty much any other software, and the cool part is integrating the virtual box into your linux desktop - ie: you have a windows start menu on a linux desktop ohmy.gif


Thanks.

Although I just tried to install W7 Ultimate on the MBP and Apple in all its glory decided it can't partition the HDD because of SL (Snow Leopard). So it looks like I'm kinda stuck in limbo at the moment. Who wants to buy a MBP? tongue.gif
the red krawler
If youre booting off a livecd, gparted (or similar) should partition whatever the hell it likes?
MarcD
I''m not going to tell you what to do, but I'll give you some leads otherwise you learn nothing from it.

For cron, you can start by running crontab -e to edit your current cron config for THE USER YOU ARE CURRENTLY LOGGED IN AS. If you want to set a system-wide cron entry, then it varies with each OS slightly. However, there SHOULD be a /etc/crontab that you can put junk into.

As for the config of crontab, run 'man 5 crontab' and that will describe to you how to make a cron entry.

To find the files you are looking for, you will want to use the 'find' command. Again, 'man find' will show you all the options. You should draw your attention to the -ctime option that allows you to specify how long ago the file was changed.

Lastly, you may want to brush up on your bash commands and how to do a for-loop.

Something like for blah in `ls -a .`; do echo $blah >> somefile.txt; done; will, for example print all the lines returned by the command la -a . into the file somefile.txt.

Your solution will make use of the above but instead of doing an ls -a , you will be using the find command. Oh, and perhaps 'date'!

Enjoy.


QUOTE (CALIbrated @ Oct 5 2009, 01:36 PM) *
you dont have to be a linux guru to be an IT guru.

personally, i hate linux. but give me anything MS related (servers) and im happy. ps. i've done my linux courses, so i'm capable tongue.gif i just dont like using it, unless i have to. and ubuntu was developed in a garage 20km from where i used to live. biggrin.gif


Command line is a bit too complicated? wink.gif


QUOTE (Mr.B @ Oct 6 2009, 06:47 AM) *
Speaking of ubuntu, how is it? I'm tempted to set up a virtual machine to run it one for a play around.


It's great! It's everything you love about Debian (package management) with commercial support and faster release cycles.
CALIbrated
QUOTE (MarcD @ Oct 6 2009, 02:40 PM) *
Command line is a bit too complicated? wink.gif

uh, no. i've got my linux certifications and experience with Red Hat, Debian, Fedora Core, and Ubuntu. i just dont like linux. in almost the same way i dont like mac. just personal preference.
Silly Silvia
Just a bit of an update, I actually did some work and today I passed my unix network admin subject at uni, very comfortably.

When I asked for help I didnt even look at crontab, after reading 5 minutes about it figured it out, did the same with tcp wrappers, iptables, apache2 configuration although i suck at that, dhcpd setup, nmap, syslog and remote logging, postfix email config, and other little commands like sed and set up files.

Easy as piss once you spend a bit of time looking into it.

For you people doubting my abilities, suck my wang.
MarcD
QUOTE (Silly Silvia @ Nov 7 2009, 08:45 PM) *
Just a bit of an update, I actually did some work and today I passed my unix network admin subject at uni, very comfortably.

When I asked for help I didnt even look at crontab, after reading 5 minutes about it figured it out, did the same with tcp wrappers, iptables, apache2 configuration although i suck at that, dhcpd setup, nmap, syslog and remote logging, postfix email config, and other little commands like sed and set up files.

Easy as piss once you spend a bit of time looking into it.

For you people doubting my abilities, suck my wang.


So next time, you're gonna read up first before posting?
Silly Silvia
Kinda defeats the purpose of posting to a degree in my opinion.

To me if I wanted to learn the answer to something I would go learn it. If I wanted a quick shortcut because I was in a time rush then I post and ask for it.

I dunno we all think in different ways, not saying my was is right or wrong but just different.

Some people know the answer and prefer not to give it, where as if it was roles reversed and someone wanted a quick answer and I knew it I would post it up without thinking twice.

It seems to me though, the majority of IT people are of the former. I don't know why, I have my theories, but to be honest I don't care in the end.

I appreciated your advice though, even if it wasn't the answer I was after you still led me in the right direction and for that I thank you.

Cheers,
Ahmed
MarcD
QUOTE (Silly Silvia @ Nov 7 2009, 10:33 PM) *
Kinda defeats the purpose of posting to a degree in my opinion.

To me if I wanted to learn the answer to something I would go learn it. If I wanted a quick shortcut because I was in a time rush then I post and ask for it.

I dunno we all think in different ways, not saying my was is right or wrong but just different.

Some people know the answer and prefer not to give it, where as if it was roles reversed and someone wanted a quick answer and I knew it I would post it up without thinking twice.

It seems to me though, the majority of IT people are of the former. I don't know why, I have my theories, but to be honest I don't care in the end.

I appreciated your advice though, even if it wasn't the answer I was after you still led me in the right direction and for that I thank you.

Cheers,
Ahmed


People aren't going to help you if you come across as being exceedingly lazy. You honestly think people are going to be sympathetic for you and do your homework when you haven't made an attempt to learn it? I'm sure people on here would be willing to help, if you can show you have already put some thought into the situation.
the red krawler
QUOTE (Silly Silvia @ Nov 7 2009, 08:45 PM) *
Just a bit of an update, I actually did some work and today I passed my unix network admin subject at uni, very comfortably.

When I asked for help I didnt even look at crontab, after reading 5 minutes about it figured it out, did the same with tcp wrappers, iptables, apache2 configuration although i suck at that, dhcpd setup, nmap, syslog and remote logging, postfix email config, and other little commands like sed and set up files.

Easy as piss once you spend a bit of time looking into it.

For you people doubting my abilities, suck my wang.


Sounds like that uni course is about half a step above a kindergarten's "license to use safety scissors" exam.

No wonder every indian call center operator has an IT degree.
n_one
QUOTE (the red krawler @ Nov 8 2009, 02:30 PM) *
No wonder every indian call center operator has an IT degree.

This.
Silly Silvia
Its a subject not a course.

I didn't know indians get their degrees from australia to return to india to work in call centers.

I don't give 2 shits either way, I have my cisco ccna1&2 to do for my last 12 credit points to complete my degree!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.