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
fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
How do I grep for a string in a file and include the previous x lines and next x lines around the match?

Adbot
ADBOT LOVES YOU

K-On! Season 2
Jan 1, 2010

by Fistgrrl

fletcher posted:

How do I grep for a string in a file and include the previous x lines and next x lines around the match?

with -C

SynVisions
Jun 29, 2003

fletcher posted:

How do I grep for a string in a file and include the previous x lines and next x lines around the match?

Get a newer version of grep. I have GNU grep 2.5.1 and it has the following options:

code:
Context control:
  -B, --before-context=NUM  print NUM lines of leading context
  -A, --after-context=NUM   print NUM lines of trailing context
  -C, --context=NUM         print NUM lines of output context
  -NUM                      same as --context=NUM
So you would be looking for -C.

dont skimp on the shrimp
Apr 23, 2008

:coffee:

Goon in the Mist posted:

Can someone recommend some Rainmeter (system monitor) alternatives for Linux?
Depends on what desktop you're using. If you're using KDE, you can check kde-look.org for plasmoids you like. If you're using gnome or XFCE you can use adesklets or gdesklets.

maskenfreiheit
Dec 30, 2004
.

maskenfreiheit fucked around with this message at 21:02 on Apr 28, 2019

inignot
Sep 1, 2003

WWBCD?
Nice. It also occurred to me I could just do this in three separate lines:

code:
sed -i 's/DR//'  scrape.txt
sed -i 's/B//'   scrape.txt
sed -i 's/OTH//' scrape.txt

BlackMK4
Aug 23, 2006

wat.
Megamarm
I used linux as my primary OS for like... 8 years, now I've moved on to an iMac and I have a small headless linux box for running my torrents/apache test server/irc under screen. What else should I have this thing run? I feel like it should be doing as much as possible. :v:


It's a 2ghz P4 with 2gb ram.

dont skimp on the shrimp
Apr 23, 2008

:coffee:

BlackMK4 posted:

I used linux as my primary OS for like... 8 years, now I've moved on to an iMac and I have a small headless linux box for running my torrents/apache test server/irc under screen. What else should I have this thing run? I feel like it should be doing as much as possible. :v:


It's a 2ghz P4 with 2gb ram.
If you store a lot of music on it, you could use it as a music player with MPD and control it from your mac.

Sojourner
Jun 6, 2007

Get In

inignot posted:

No love for SED


Try running your sed with "" quotes instead of ''. I know if you're using variables in sed, if you use '' it won't work ($myvar would be read as "$myvar" instead of whatever $myvar equals).

Thoom
Jan 12, 2004

LUIGI SMASH!
I just installed the Ubuntu Lucid RC on my new laptop via a rather convoluted process, as the install CD just gave me a black screen. I started by installing Intrepid, then upgrading to Jaunty/Karmic/Lucid via the update manager.

First of all, is this going to screw me over somehow? I know I'm missing GRUB2 and stuck with ext3 as a filesystem, but is that actually worth worrying about?

Second, due to these repeated release upgrades, I have 4 different kernels in my /boot directory. Since the Lucid kernel (2.6.32-21-generic) seems to work, is it safe to simply delete the older ones and run update-grub to clean up my boot menu, or is there some preferred way to do this via automated tools?

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

Thoom posted:

I just installed the Ubuntu Lucid RC on my new laptop via a rather convoluted process, as the install CD just gave me a black screen. I started by installing Intrepid, then upgrading to Jaunty/Karmic/Lucid via the update manager.

First of all, is this going to screw me over somehow? I know I'm missing GRUB2 and stuck with ext3 as a filesystem, but is that actually worth worrying about?

Second, due to these repeated release upgrades, I have 4 different kernels in my /boot directory. Since the Lucid kernel (2.6.32-21-generic) seems to work, is it safe to simply delete the older ones and run update-grub to clean up my boot menu, or is there some preferred way to do this via automated tools?

You should be able to use an alternate install CD to install without the GUI. That sounds like an X issue in the Live CD that obviously isn't present in the full on system, so bypassing X in the install should get you up to speed with all the spiffy new stuff.
All the way back to 8.10? Really? 9.10 didn't even work?

Thoom
Jan 12, 2004

LUIGI SMASH!

FISHMANPET posted:

You should be able to use an alternate install CD to install without the GUI. That sounds like an X issue in the Live CD that obviously isn't present in the full on system, so bypassing X in the install should get you up to speed with all the spiffy new stuff.
All the way back to 8.10? Really? 9.10 didn't even work?

8.10 was the other CD I had handy, and it worked so I didn't feel like wasting time downloading/burning CDs for 9.04/9.10 to test. Actually, when I upgraded to 9.10, I had the same black screen issue, but I was able to solve it by rebooting in recovery mode and adding a few lines to my xorg.conf (which you wouldn't be able to do on a Live CD).

I'll give the alternate-install a shot, since my gradual upgrade path seems to have hosed my synaptics driver pretty badly.

maskenfreiheit
Dec 30, 2004
.

maskenfreiheit fucked around with this message at 21:02 on Apr 28, 2019

HolyDukeNukem
Sep 10, 2008

GregNorc posted:

So I am trying to get some form of linux, ANY form, onto my Thinkpad X201.

I've narrowed down the issue to probably being due to this integrated graphics card

I had at least gotten a mostly working setup via the 9.04 alternative install... I had a working system, except for one tiny problem: The system froze shortly 30 seconds after login, without fail. So, it was completely unusable unless I stayed in text only mode....

I looked around, and the issue apparently was with my graphics card on the X201.

Here is the thinkwiki page for the laptop and the graphics card:
http://www.thinkwiki.org/wiki/Category:X201
http://www.thinkwiki.org/wiki/Intel_HD_Graphics

I had been attempting to manually update the kernel to 2.6.33 using .debs I found online - no luck.

Someone suggested I try the newer version of Ubuntu, so I downloaded the Ubuntu 10.04 RC alt install CD... it installed fine, but when it starts up, it now just goes to a black screen. I can't even go into text only mode like the 9.04 beta was letting me

:confused:

I am very desperate, I am _very_ close to sending this laptop back to Lenovo, if anyone has any suggestions on how to get a working Ubuntu (or any other distro) install going on an X201, please share any details you can remember!

i would try using arch linux (http://www.archlinux.org/) since arch just updated to the 2.6.33 kernel in it's stable repositories. I've never had issues with it for just about anything. Just remember that arch has a little different mindset than most linux distributions where it tries to centralize loading daemons and whatnot. Also AUR is your friend when you need packages installed.

Rastor
Jun 2, 2001

GregNorc posted:

Someone suggested I try the newer version of Ubuntu, so I downloaded the Ubuntu 10.04 RC alt install CD... it installed fine, but when it starts up, it now just goes to a black screen. I can't even go into text only mode like the 9.04 beta was letting me
Do you see anything at all, or is it just totally black when it boots?

If it's just black it sounds like the framebuffer isn't being initialized. I don't remember the exact syntax but I would suggest changing the kernel options to not use a framebuffer and also blacklist the framebuffer module.

Does the server distribution initialize a framebuffer by default? If not you could install that and then install the desktop packages.

maskenfreiheit
Dec 30, 2004
.

maskenfreiheit fucked around with this message at 21:03 on Apr 28, 2019

HolyDukeNukem
Sep 10, 2008

GregNorc posted:

Downloading an arch image now. Slowwwwly...

Someone suggested to me I try disabling KMS... which I have no clue how to do :/ (especially since it's booting to a blank screen...)


It's totally black... like it mentions grub then shows a blinking "_" then black screen. If arch doesn't work I'll try the server install I guess, I'd like to try disabling KMS as well if I can figure out how...

i would definitely try downloading a torrent, on their site they recommend it since they don't have a heck of a lot of bandwidth for iso's.

dont skimp on the shrimp
Apr 23, 2008

:coffee:

GregNorc posted:

Downloading an arch image now. Slowwwwly...

Someone suggested to me I try disabling KMS... which I have no clue how to do :/ (especially since it's booting to a blank screen...)


It's totally black... like it mentions grub then shows a blinking "_" then black screen. If arch doesn't work I'll try the server install I guess, I'd like to try disabling KMS as well if I can figure out how...
Newer versions of Xorg require KMS for the intel drivers anyway, so it might not work.

I think you can try disabling it by adding i915.modeset=0 to the kernel line in grub.

Keito
Jul 21, 2005

WHAT DO I CHOOSE ?
Arch is great and being up to date adds support for all kinds of new hardware, but make sure to follow the Beginner's Guide if it's your first time around, because you'll basically be setting the system up from scratch, so can be a little intimidating.

dont skimp on the shrimp
Apr 23, 2008

:coffee:

Keito posted:

Arch is great and being up to date adds support for all kinds of new hardware, but make sure to follow the Beginner's Guide if it's your first time around, because you'll basically be setting the system up from scratch, so can be a little intimidating.
If you find it too intimidating, you could give Chakra a spin. It's basically just arch with KDE installed and a GUI installer.

Keito
Jul 21, 2005

WHAT DO I CHOOSE ?

Zom Aur posted:

If you find it too intimidating, you could give Chakra a spin. It's basically just arch with KDE installed and a GUI installer.

There's also ArchBang which is pretty much is the same thing with OpenBox instead, but the project was started this year and thus is not as mature and polished as Chakra yet.

Chakra's KDE4 theme looks pretty drat nice, by the way. Haven't been able to stand KDE ever since checking it out on some of the first Knoppix versions, but it seems to have improved a lot (well, duh).

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Zom Aur posted:

If you find it too intimidating, you could give Chakra a spin. It's basically just arch with KDE installed and a GUI installer.
Don't get too attached to it. One of the main guys behind it died last weekend.

http://chakra-project.org/news/index.php?/archives/54-Sad-news-we-lost-one-of-our-own.html

Keito
Jul 21, 2005

WHAT DO I CHOOSE ?

Misogynist posted:

Don't get too attached to it. One of the main guys behind it died last weekend.

http://chakra-project.org/news/index.php?/archives/54-Sad-news-we-lost-one-of-our-own.html

Having been the project leader it will for sure slow down development, but it looks like the developers all want to keep working on his legacy.

Just-In-Timeberlake
Aug 18, 2003
Can somebody tell me how to get a synergy client to start automatically at boot on Ubuntu 10.04?

I've got the server running on Windows Server 2008 which required me clicking a button to get it to autostart, but I can't get things starting automatically on the Ubuntu system.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

golgo13sf posted:

Can somebody tell me how to get a synergy client to start automatically at boot on Ubuntu 10.04?

I've got the server running on Windows Server 2008 which required me clicking a button to get it to autostart, but I can't get things starting automatically on the Ubuntu system.
http://synergy2.sourceforge.net/autostart.html

I use KDM, so I have it in my Xsetup file.

Just-In-Timeberlake
Aug 18, 2003

Misogynist posted:

http://synergy2.sourceforge.net/autostart.html

I use KDM, so I have it in my Xsetup file.

Thanks, I'm new to Linux so I'm not too familiar with config files.

nikomo
Oct 21, 2009

by angerbotSD
So, someone just moved into where I'm living.
Curious of his name, I checked it. I took a picture since I figured you guys might get a kick out of it.

Say hello to apartment 44, Mr. WINE.

maskenfreiheit
Dec 30, 2004
.

maskenfreiheit fucked around with this message at 21:03 on Apr 28, 2019

Denim Dude
Feb 21, 2006
I suggest tree
Boot a live CD, mount your Ubuntu partition and edit grub?

dont skimp on the shrimp
Apr 23, 2008

:coffee:
When it boots, hit whatever key to get to the boot menu, then add i915.modeset=0 to the kernel line in grub.

This will disable KMS for this session, then do whatever that ubuntu guide said to make it default for newer sessions.

maskenfreiheit
Dec 30, 2004
.

maskenfreiheit fucked around with this message at 21:03 on Apr 28, 2019

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

GregNorc posted:

Yeah, this worked, I can boot and start to install the 10.04 RC cd I made, however the final release CD I have boots to a black screen, no way to edit boot options.

I'm gonna just settle for the RC at this point and hope someone else has the same error, or maybe wait a couple weeks til they update the Fedora USB creator and try that... there shouldn't be any major issues from running the RC right?

Edit: If I do an upgrade from the RC to the final release, will it save my edited grub or hose it and thus brick the machine?

If you run 'sudo apt-get dist-upgrade' you'll be off the RC and onto the final. And in fact 'sudo apt-get upgrade' will do. I just checked on my RC machine, only 60 packages, about 100 MB, to update.

maskenfreiheit
Dec 30, 2004
.

maskenfreiheit fucked around with this message at 21:03 on Apr 28, 2019

rugbert
Mar 26, 2003
yea, fuck you
I just upgraded my media server with some bigger harddrives and want to make a better backup system. Before I was CRONing a job that would TAR up every file in my media directories into respective TAR files.

That sucks tho, because it just keeps backing up the same poo poo over and over again.

What can I do to like, only add new files to the backups? I dont mind strait up copying the files from one directory to a directory on a backup HDD if I can have the backup script only copy over new files.

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!

rugbert posted:

I just upgraded my media server with some bigger harddrives and want to make a better backup system. Before I was CRONing a job that would TAR up every file in my media directories into respective TAR files.

That sucks tho, because it just keeps backing up the same poo poo over and over again.

What can I do to like, only add new files to the backups? I dont mind strait up copying the files from one directory to a directory on a backup HDD if I can have the backup script only copy over new files.

You're looking for an 'incremental' backup. Use the -u option to update the tarball with newer files

rugbert
Mar 26, 2003
yea, fuck you

Bob Morales posted:

You're looking for an 'incremental' backup. Use the -u option to update the tarball with newer files

ahhhh yes, that term was rolling around in my head as I wrote it but I wasnt sure about it. Thanks!

Peanutmonger
Dec 6, 2002

rugbert posted:

ahhhh yes, that term was rolling around in my head as I wrote it but I wasnt sure about it. Thanks!

Watch out, as --update doesn't remove old versions. Technically, you'd want that with backups, but it also means your tarball will grow and grow. For more robust incremental backups you should use something like rsnapshot. Even if you use it for something as simple as only keeping two previous versions it can still be a lifesaver.

maskenfreiheit
Dec 30, 2004
.

maskenfreiheit fucked around with this message at 21:03 on Apr 28, 2019

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

GregNorc posted:

wlan0 802.11bg ESSID:"fleshlight" Nickname:"rtl8191SEVA2"

Heh. Have you run the 'Hardware Drivers' tool yet? It's in either Administration or Prefrences. If there's a package needed to run that wifi card, that tool will find it.

Adbot
ADBOT LOVES YOU

maskenfreiheit
Dec 30, 2004
.

maskenfreiheit fucked around with this message at 21:03 on Apr 28, 2019

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