Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
spankmeister
Jun 15, 2008






Yup I do that too.

Adbot
ADBOT LOVES YOU

JHVH-1
Jun 28, 2002
I don't like how that tutorial gives you a script like that which drops your rules and puts those in and then overwrites your rule table with the save line. They should at least give a heads up if they tell you to blindly run stuff.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
code:
tail -n 0 -f /path/to/*/mylog.log | grep stringiwant
This works fine, and prints the lines I'm interested in to stdout

code:
tail -n 0 -f /path/to/*/mylog.log | grep stringiwant > out.txt
This doesn't seem to save anything to out.txt, why not?

BnT
Mar 10, 2006

Try adding --line-buffered to your grep:

code:
tail -n 0 -f /path/to/*/mylog.log | grep --line-buffered stringiwant > out.txt

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!


Won't 'tail -n 0' not give you anything?

Longinus00
Dec 29, 2005
Ur-Quan

Bob Morales posted:

Won't 'tail -n 0' not give you anything?

Initially but the -f will add more output.

VVV


Changes buffering to line buffered. This means it'll flush when it hits a newline instead of when it hits an arbitrary amount of data. If you hadn't terminated your command with control-c and had let it work for awhile you would have seen it write to the file eventually.

Longinus00 fucked around with this message at 03:24 on Jul 27, 2011

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

BnT posted:

Try adding --line-buffered to your grep:

code:
tail -n 0 -f /path/to/*/mylog.log | grep --line-buffered stringiwant > out.txt

That did the trick. What exactly does that do?

Jeesis
Mar 4, 2010

I am the second illegitimate son of gawd who resides in hoaven.
Woo I am having problems with a new video card, specifically xorg. I keep getting AddScreen/ScreenInit failed for driver 0 whenever I try the startx command. The card I put in is a Geforce 210 and the driver is nouveau. I am questioning if this card does not like my dual monitor setup.

telcoM
Mar 21, 2009
Fallen Rib

Kaluza-Klein posted:

code:
Chain INPUT (policy DROP 176 packets, 8786 bytes)
 pkts bytes target     prot opt in     out     source               destination         

[...]

 2920  528K ACCEPT     all  --  eth0   *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
  206 10540 tcp_inbound  tcp  --  eth0   *       0.0.0.0/0            0.0.0.0/0           
    0     0 udp_inbound  udp  --  eth0   *       0.0.0.0/0            0.0.0.0/0           
    0     0 icmp_packets  icmp --  eth0   *       0.0.0.0/0            0.0.0.0/0 
[...]          

You would need to duplicate these four rules for your VPN tunnel device (tun0) too, otherwise the decrypted traffic incoming from tun0 gets dropped by the default DROP policy.

When traffic comes in through a VPN tunnel, first an encrypted VPN protocol packet comes in from the regular network device (eth0 here, I guess) and goes to the network socket of the VPN software. Then the VPN software unwraps the VPN headers and decrypts the package, which then returns to the OS's network driver code as an incoming packet from the tun0 device.

As far as iptables is concerned, tun0 is a real network device, completely separate from eth0. Only the VPN software knows that the encrypted traffic via eth0 and the decrypted traffic via tun0 are related to each other.

Kaluza-Klein posted:

code:
Chain FORWARD (policy DROP 16 packets, 960 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   39  2420            all  --  tun0   eth0    0.0.0.0/0            0.0.0.0/0
[...]           

This FORWARD rule is also suspect: since it has no target specified, it has no effect other than counting the amount of data matched by the rule. This probably is not what you want.

Jerky Beef Kong
Jul 1, 2007

Jeesis posted:

Woo I am having problems with a new video card, specifically xorg. I keep getting AddScreen/ScreenInit failed for driver 0 whenever I try the startx command. The card I put in is a Geforce 210 and the driver is nouveau. I am questioning if this card does not like my dual monitor setup.

Unsure if this is of any use but:

quote:

Apparently if I add 'video=LVDS:d' to the kernel parameter line, the hang with
2.6.37 doesn't happen. This definitely was not needed with 2.6.36.

Taken from here.


Edit: Does anyone use e17 with Chromium? I've found that Enlightenment and Xorg both spike to about 30% CPU usage when the Chromium window is active, and sit at about 5% when it's in the background. Both are typically 0-3% without Chromium open.

Jerky Beef Kong fucked around with this message at 14:57 on Jul 27, 2011

spankmeister
Jun 15, 2008






Does anyone know how to send a confirmation "y" to a command?

I need to confirm a "do you want to continue" prompt inside a script so I can run that command nohupped.

(The system does not have screen.)

What I'm doing now is starting a screen session on my linux box, then ssh-ing into the machine (HPUX) and running the command, then detaching the session.

I'd like to be able to do it on the machine itself.

evol262
Nov 30, 2010
#!/usr/bin/perl
yes | command

Yes, HP-UX has yes.

spankmeister
Jun 15, 2008






evol262 posted:

yes | command

Yes, HP-UX has yes.

doh, of course

Thanks. :)

TheGopher
Sep 7, 2009
If you need something more advanced, check out expect.

TheGopher fucked around with this message at 20:51 on Jul 27, 2011

General_Failure
Apr 17, 2005

spankmeister posted:

Palm has the worst Linux support.

It's just the way of most things in open source-land. Companies support Windows first, Mac second and maybe, if you're lucky, they support Linux. In most cases they don't so someone has to reverse engineer the thing and write some drivers for it. This usually isn't of the same quality as the official software.

You have misconfigured your video card/screen or something.

It's the weirdest thing. I remembered I did a few random updates today. I think it was Java and a few bits and pieces like that. I was elsewhere so I didn't bother rebooting. I just did and for some reason the visual elements are roughly as crisp as Windows. I checked the screen settings. They have changed to 65Hz. But I have tried different refresh rates in the past yielding no different results.

I remember years back using ...power ...something? in Windows 2000 / XP / DOS etc which let me configure the crap out of the hardware. I mostly used it to force my computer to work with a Sun workstation monitor, and to get one of my arcade machines which I changed to a MAME box to behave. There were so many other variables that made a difference, like hphase or something like that, front porch, back porch etc. All those things which are probably irrelevant on an LCD but totally relevant to CRTs. I wonder if something like that is at work.

spankmeister
Jun 15, 2008






General_Failure posted:

I remember years back using ...power ...something? in Windows 2000 / XP / DOS etc which let me configure the crap out of the hardware. I mostly used it to force my computer to work with a Sun workstation monitor, and to get one of my arcade machines which I changed to a MAME box to behave. There were so many other variables that made a difference, like hphase or something like that, front porch, back porch etc. All those things which are probably irrelevant on an LCD but totally relevant to CRTs. I wonder if something like that is at work.
Powerstrip. :)

You can do much the same that Powerstrip does with the Xorg config modelines and such, but that's pretty advanced.

ExcessBLarg!
Sep 1, 2001
So I upgraded the kernel on my Debian router machine yesterday to linux-image-3.0.0-1-amd64, and apparently it broke PMTU discovery again (or at least, TCPMSS clamping to PMTU), which means I couldn't sent packets larger than 1492 bytes (interface MTU is 1500).

Unfortunately the only symptom I ran into of this was that I couldn't post replies on SA--the connection would time out. I tried clearing cookies/cache/history/etc., different web browsers, different machines, etc. Of course, I didn't try a different Internet connection until after emailing SA devs. :doh:

So yeah, uh, if you can't post on SA, perhaps upgrading to Linux 3.0 is to blame?

kyuss
Nov 6, 2004

My next project is to digitize all my paperwork of the last years, and put it all in one big digital archive. I'll propably use the document scanner at work to make PDFs, and run an OCR tool on it afterwards.

I want to use PDF metadata to their full advantage, but I'm stumped at how to use them efficiently from an outside (file browser?) perspective.

Is there some indexing tool that runs under linux and is metadata-aware? Or should I try the non-minimalist approach and use some sort of open source document managing system? As always, any help is appreciated :)

Kiffetastic
Aug 20, 2004

Oooooh Yeeeees!
Hey hey Linux people, I have a question for you!

If I was lookin' to familiarize myself with Linux, say teach myself the ins and outs of it, what would be the best distribution to start with? And does anyone have any pointers? Linux is something I've never really touched on in my IT career and now's as good of a time as any I suppose. I need to get a decent grasp of the command line interface as well as a general understanding of the OS too. Thanks!

spankmeister
Jun 15, 2008






Kiffetastic posted:

Hey hey Linux people, I have a question for you!

If I was lookin' to familiarize myself with Linux, say teach myself the ins and outs of it, what would be the best distribution to start with? And does anyone have any pointers? Linux is something I've never really touched on in my IT career and now's as good of a time as any I suppose. I need to get a decent grasp of the command line interface as well as a general understanding of the OS too. Thanks!

Any of the major ones should work. It's generally a good idea to try out a few different ones so you can familiarise yourself with the differences between them. (most notably package management and location of various settings etc...)

Here are a few good ones:

-Ubuntu has become the ubiquitous Linux distro over the past few years, it gets a lot of flak from the purists but it's actually pretty good. (Although the new interface they've introduced sucks). It's Debian-based so much of the stuff that applies to Ubuntu applies to Debian as well.

-Debian, many distro's are based on Debian and it's one of the oldest distributions that's still going strong. Very popular for servers.
It's like Ubuntu but rougher around the edges. Debian is one of my old favourites.

-Fedora is still one of the more cutting-edge distro's and quite popular. Worth checking out if you want something Redhat-ish but also want modern packages.

-CentOS is a free clone of Red Hat Enterprise Linux and if you plan on learning an "enterprise"-quality linux. (I support RHEL systems at work). Downside is that the packages it uses are older (but more stable).

-OpenSUSE, another big player on the "enterprise" market is SUSE, and OpenSUSE is the free version of it. I don't care much for SUSE myself but some people swear by it.

-Arch Linux. Once you've familiarised yourself with one of the above, try this one out. It's a bit more "roll your own" than the other ones but it's fairly popular and has good community support.

Accipiter
Jan 24, 2004

SINATRA.

spankmeister posted:

Any of the major ones should work. It's generally a good idea to try out a few different ones so you can familiarise yourself with the differences between them. (most notably package management and location of various settings etc...)

Here are a few good ones:

-Ubuntu has become the ubiquitous Linux distro over the past few years, it gets a lot of flak from the purists but it's actually pretty good. (Although the new interface they've introduced sucks). It's Debian-based so much of the stuff that applies to Ubuntu applies to Debian as well.

-Debian, many distro's are based on Debian and it's one of the oldest distributions that's still going strong. Very popular for servers.
It's like Ubuntu but rougher around the edges. Debian is one of my old favourites.

-Fedora is still one of the more cutting-edge distro's and quite popular. Worth checking out if you want something Redhat-ish but also want modern packages.

-CentOS is a free clone of Red Hat Enterprise Linux and if you plan on learning an "enterprise"-quality linux. (I support RHEL systems at work). Downside is that the packages it uses are older (but more stable).

-OpenSUSE, another big player on the "enterprise" market is SUSE, and OpenSUSE is the free version of it. I don't care much for SUSE myself but some people swear by it.

-Arch Linux. Once you've familiarised yourself with one of the above, try this one out. It's a bit more "roll your own" than the other ones but it's fairly popular and has good community support.

All of these except for (Debian and Arch) are awful, awful choices. And SuSE is the absolute worst distribution to ever have been poo poo out of someone's rear end in a top hat, because it drat sure wasn't "developed".

You don't install Fedora/CentOS or Ubuntu if you want to "learn Linux". You install Slackware. Or Debian.

kyuss
Nov 6, 2004

kyuss posted:

My next project is to digitize all my paperwork of the last years, and put it all in one big digital archive. I'll propably use the document scanner at work to make PDFs, and run an OCR tool on it afterwards.

I want to use PDF metadata to their full advantage, but I'm stumped at how to use them efficiently from an outside (file browser?) perspective.

Is there some indexing tool that runs under linux and is metadata-aware? Or should I try the non-minimalist approach and use some sort of open source document managing system? As always, any help is appreciated :)

Current status:

I intend to create some sample PDFs @300dpi on monday, and try my luck with tesseract + hocr2pdf. This should eventually give me sandwich PDFs, with the original scan as image overlaid by the OCR results as invisible text. Bonus points for creating PDF/A. I'll let Google Desktop index these PDFs afterwards for full text indexing, and stick to meaningful folder names, as that's propably all I need.

text editor
Jan 8, 2007

Accipiter posted:

All of these except for (Debian and Arch) are awful, awful choices. And SuSE is the absolute worst distribution to ever have been poo poo out of someone's rear end in a top hat, because it drat sure wasn't "developed".

You don't install Fedora/CentOS or Ubuntu if you want to "learn Linux". You install Slackware. Or Debian.

Gonna quote this so you read it. Ubuntu & Fedora are basically what happens when you start aiming for usability at any cost, and just start tacking on all kind of shinies anywhere in the system. Ubuntu has no rhyme or reason in its placement of config files or organization, and isn't as elegant as Slackware or Arch, or even Debian.

spankmeister
Jun 15, 2008






Accipiter posted:

All of these except for (Debian and Arch) are awful, awful choices. And SuSE is the absolute worst distribution to ever have been poo poo out of someone's rear end in a top hat, because it drat sure wasn't "developed".

You don't install Fedora/CentOS or Ubuntu if you want to "learn Linux". You install Slackware. Or Debian.
Pff okay I won't go into OS wars with y'all here. Just look at installed base for all those distro's and then we'll talk okay.

e: to clarify: If you intend to work with Linux in a professional capacity it doesn't really matter how "elegant" a distro is, it DOES matter how much it's used within corporations and businesses. I can tell you right now that very few use Slack or Arch.

spankmeister fucked around with this message at 09:11 on Jul 31, 2011

CoronaX
May 28, 2009
I searched but either I'm a tard and didn't see it or didn't find it. I'm looking for a Linux OS for my Vostro 1500 laptop. I usually just use it to use the internet and play music so no gaming or anything like that. Any suggestions?

angrytech
Jun 26, 2009

CoronaX posted:

I searched but either I'm a tard and didn't see it or didn't find it. I'm looking for a Linux OS for my Vostro 1500 laptop. I usually just use it to use the internet and play music so no gaming or anything like that. Any suggestions?

Ubuntu

PrinceofNessus
Jan 9, 2007


CoronaX posted:

I searched but either I'm a tard and didn't see it or didn't find it. I'm looking for a Linux OS for my Vostro 1500 laptop. I usually just use it to use the internet and play music so no gaming or anything like that. Any suggestions?

Ubuntu sucks, Try Sabayon. I've heard it's pretty solid out-of-the-box, and it's Gentoo based.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Kiffetastic posted:

Hey hey Linux people, I have a question for you!

If I was lookin' to familiarize myself with Linux, say teach myself the ins and outs of it, what would be the best distribution to start with? And does anyone have any pointers? Linux is something I've never really touched on in my IT career and now's as good of a time as any I suppose. I need to get a decent grasp of the command line interface as well as a general understanding of the OS too. Thanks!

'Learning Linux' is kind of vague. If you have servers at work that use Linux, learn whatever they use, since that's going to make the most sense. The basics of Linux, the shells, the programs that run on Linux (Apache, sendmail, MySQL...), KDE/GNOME, that kind of stuff is going to be 95% the same on any distribution. Some will have newer or older versions, configuration file locations will be different, and the process to startup/shutdown them will be a little different. The package managers are different.

Fedora/Ubuntu for a workstation, and CentOS for a 'server' in the business world. It's the clone of Redhat and probably the most popular out there. Some organizations will run OpenSUSE (typically if they are/were a Novell shop) and you'll get other companies that run something else.

I'd start with either of these books:



Take your laptop to the bookstore, install from the included DVD, and just start going through the chapters.

covener
Jan 10, 2004

You know, for kids!

PrinceofNessus posted:

Ubuntu sucks, Try Sabayon. I've heard it's pretty solid out-of-the-box, and it's Gentoo based.

Sounds like generally lovely advice for a new user, unless you're trying to impress the new hot girl in the LUG.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

PrinceofNessus posted:

Ubuntu sucks, Try Sabayon. I've heard it's pretty solid out-of-the-box, and it's Gentoo based.

Thanks so much for your reasoned, well-supported, articulate opinion on Ubuntu, and for your endorsement of an obscure distribution that you don't claim to have actually used :thumbsup:

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?

PrinceofNessus posted:

Ubuntu sucks, Try Sabayon. I've heard it's pretty solid out-of-the-box, and it's Gentoo based.

Let me lighten up on the snark a bit:

Ubuntu might suck, but tons of people use it, and you're very likely to get help with it as a newbie. Same goes for Redhat/CentOS and Debian.

Any of those 3 are great. Ubuntu is your best bet for a desktop system, primarily for the reason given above.

Once you know your way around linux a bit, feel free to go for the more esoteric distros.

spankmeister
Jun 15, 2008






Do people still use Gentoo? It used to be the cool kids' disto like ten years ago but that place has been taken by Arch I think?

dont skimp on the shrimp
Apr 23, 2008

:coffee:

spankmeister posted:

Do people still use Gentoo? It used to be the cool kids' disto like ten years ago but that place has been taken by Arch I think?
I suppose sabayon might be a viable alternative to those who liked gentoo but couldn't stand the compile times. I've been meaning to give it a spin in a VM and see for myself.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

spankmeister posted:

Do people still use Gentoo? It used to be the cool kids' disto like ten years ago but that place has been taken by Arch I think?

I have a server that is running gentoo, been nice and solid for years now. I've moved away from Gentoo on my desktop and laptop, compiling was enough of a chore that I would put off updates.

angrytech
Jun 26, 2009
I've never felt the need to mess around with Gentoo. After having to build from source back in the early 00's, I pretty much swore off that bs.

ToxicFrog
Apr 26, 2008


CoronaX posted:

I searched but either I'm a tard and didn't see it or didn't find it. I'm looking for a Linux OS for my Vostro 1500 laptop. I usually just use it to use the internet and play music so no gaming or anything like that. Any suggestions?

Mint. It's Ubuntu-based (which means there's a huge selection of existing software for it and it's easy to get support for), but with a greater degree of just-workingness for things like wireless support and MP3 playback.

ExcessBLarg!
Sep 1, 2001
Why does Ubuntu suddenly suck?

I run Debian myself, so I haven't been following Ubuntu shenanigans too closely. I know folks were upset with the switch to Unity in the latest release, although it's not clear to my why they're even upset with that except that it's different. However, can't you just tick "GNOME Desktop" at the *DM prompt if that's a problem?

Did they fuckup hardware support recently or something?

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?

ExcessBLarg! posted:

Why does Ubuntu suddenly suck?

I run Debian myself, so I haven't been following Ubuntu shenanigans too closely. I know folks were upset with the switch to Unity in the latest release, although it's not clear to my why they're even upset with that except that it's different. However, can't you just tick "GNOME Desktop" at the *DM prompt if that's a problem?

Did they fuckup hardware support recently or something?

Linux fanboys are nothing but techno-hipsters.
"Ubuntu is too mainstream and sold out, man. I liked their earlier stuff before they went all corporate. I only use $ESOTERIC_DISTRO now, you probably haven't heard of it."

All distros have their crap, ubuntu no exception. It works for me as a desktop. I tell newbies to go there (or redhat/centos or debian) precicely because it's so mainstream, and there's a shitton of help EVERYWHERE for it.

nitrogen fucked around with this message at 20:00 on Aug 1, 2011

BnT
Mar 10, 2006

Kiffetastic posted:

If I was lookin' to familiarize myself with Linux, say teach myself the ins and outs of it, what would be the best distribution to start with?

I cringed when I saw that over the weekend. I envisioned a hijacked thread, blood spilled, a possibility of poo flinging, maybe even a comparison to major religions :colbert:

It really doesn't matter, you'll learn a ton regardless of which distro you pick. The text editor you pick, however...

Adbot
ADBOT LOVES YOU

text editor
Jan 8, 2007

BnT posted:

I cringed when I saw that over the weekend. I envisioned a hijacked thread, blood spilled, a possibility of poo flinging, maybe even a comparison to major religions :colbert:

It really doesn't matter, you'll learn a ton regardless of which distro you pick. The text editor you pick, however...

He's right. Regardless of what text editor and distro you pick, especially if it is debian and vim, you'll be fine.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply