| |
| |
| |
|
Page: 1 2 3 4 5 6
Comments:
<0> how do i grep a word to look at the beginning of a line <0> grep -C 2 failure ~/* <1> klax73: "^word" <0> grep -C 2 "^failure ~/* <1> the ^ represents beginning of line (bol) <1> end quote ! <0> grep -C 2 "^failure" ~/* ? <1> :) <0> so what makes something at begginning of line <0> cause with that it dont find what im looking for <0> oh i hoy <0> grep -C 2 "^failure" ~/* <1> the ^ means bol .. <0> hey ~/* means that its going to search for everything in and under <0> ~ <0> correct?
<1> not everything under <1> just the files on that level <0> cause its suppose tosearch for all files in ~ and all its subdirectories <1> no you need -r for that <0> grep -r -C 2 "^failure" ~/* <1> yeah <1> well grep -r -C 2 "^failure" ~ <0> ok cool <0> what if u only want everything under ~ <1> -r is everything under ~ and its subdirs <1> without -r its just <1> ~ <0> egrep -wnr 'w(ither|hether)' ~ <0> so that would be everything under i take it <1> yes <0> i think i dont want to include ~ <0> just stuff under it <1> use find <1> find ~ -type f -mindepth 1 | xargs grep -wnr 'w(ither|hether)' <1> er .. egrep <1> actually .. mindepth 2 <0> we never used mindepth or xargs <1> mindepth forces find to start at a particular level/depth <1> and xargs basically combines the output of find to give to grep <1> like say find get 1000 items.. <1> xargs will p*** it to grep in 200 at a time <2> haha <2> regexp lesson 2 <2> woah...did you know.....lcd's use 1/3rd of energy compared to crt's <2> thats like woah! <1> OmegaEvil: i knew <1> we overloaded every cl***room <2> I could plug this lcd into the UPS' np <0> znx hey <0> Search for files directly under the /var/log directory that contain the word 'su' (case sensitive) at EITHER the END of a line OR the beginning of the line. Add two lines of context AFTER each keyword found. <0> find /var/log -type f | egrep -wr -C 2 "^su^" <2> overloaded ? <0> i cam eup with that <2> you mean the electrical sockets ? <2> klax73, errrm <2> is this a uni coursework thing ? <0> yeah <2> then we wont help you anymore <1> klax73: "(^su|su$)" <2> hehe <1> heh <2> learn it yourself... <0> well i dont know who to ask <0> i am <1> klax73: and dont forget xargs! <2> you can read about regexp <2> people never learn if they dont read <0> i do read <0> this is why i get the commands accomplished <0> to som exstint <0> and i use man <1> pinfo! <0> woot <0> find /var/log -type f | xargs egrep -wr -C 2 "(^su|su$)"
<2> god how gay <2> lol <1> klax73: :) <2> there....colour for you....mainly brown! <1> OmegaEvil: :P <1> haha <2> lol <2> znx remember that British gas advert <2> saying people are moving back to British gas <2> lolol <2> every 60 seconds <1> hehe <1> yeah i remember <2> now every 2 seconds a customer will move <2> lolol <1> hhehe <2> i just checked for fun <2> if i was with them id pay 80 more <2> on a 360 bill <1> :/ <0> -string means not to include a string ? <1> er.. :x <1> find and grep dont have -string :? <2> lol <2> i was just going to say that <2> what a donkey... <2> a millionair...money launders money for a drugs guy...and his defence in court.... <2> I was only helping a freind <2> lool <1> hahaa <2> sorry your honour....i was only helping a friend <2> can i go now ? <2> lol <2> no...prison for 18months you muppety <2> -y <2> muhahahaah <2> they are still showing that British gas advert <2> it was just on a sec ago <2> hahaha <2> watch channel 4 <2> muahhaa <3> gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape gay rapepee ape <4> wtf? <5> too bad the bots aren't affected by unemployment <2> ? <5> as in the bots losing their jobs <6> wtf <7> Hi all <7> I have to reinstall a new server with fedora... <7> what can I do best? Wait for FC5, install FC5-test3 and upgrade when FC5 is released, or install FC4 and upgrade to FC5 when it is released? <2> id wait for fc5 <2> its only a few weeks now <7> it isn't possible to upgrade FC5-test3 tot FC5 easily? <2> 15 March 2006 Release open, announced <2> yeah you can do that <7> still a month to go :) <2> doesnt mean i like upgrades <7> why not? <2> and i dont like test releases either <7> my old server is a bit unstable, so I am unsure what to do now... <2> despite them being very stable <2> define unstable ? <7> it crashes twice a week average <7> without any clue why... <2> what do the logs say ? <7> nothing on the console, nothing in the logs <7> could be the hardware too <2> hardware issues ? <2> or powersupply <2> check voltages on the psu <7> maybe, I have a totally new server now, where I need some OS on :) <7> it is a production server, I can't check it easily <2> hmm still running the old ?
Return to
#fedora or Go to some related
logs:
conky weather #sql startup item problem +windows #politics #nhl cdrwin error reading inquiry data for devices
#politics #nhl #heroin #winvista
|
|