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
Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

tehk posted:

Lets say I have a folder named "Some Band" in my home directory. I would navigate there using escape slashes like "cd /home/tehk/Some\ Band/" or "cd /home/tehk/"Some Band"/". The former works the best and in the most use cases.
So you understand what's going on with the slash, it's called an escape character. The backslash signifies "the next character is to be treated as a literal character."

So instead of treating a space as "blank" whitespace, it treats it as character "\040" (the octal value of space).

The same thing goes for other special characters. If you accidentally create a filename with a "?", or a "#", you can access it by escaping the special character.

Adbot
ADBOT LOVES YOU

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Hughmoris posted:

Ok, I installed Ubuntu a few days ago and am trying to find my way around some basic terminal commands. I'm making some progress, but I'm stuck on something that is almost too embarrassing to ask... How in the hell do you handle spaces in folders and file names?

Ex. I have a music folder, with a Jack Johnson folder inside that, and several albums inside that. I've tried cd /music/Jack Johnson and it won't recognize the command. I've tried seemingly ever combination of odd characters to fill the space and can't figure it out.

What simple step am I missing?

you can also do

cd "/music/Jack Johnson"

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior
Fun Shoe
Hey everyone:

I've wanted to create some simple mysql reports based on the database that Snort creates. When I Google for MySql reporting, it's mostly "Please buy this product" and so on. Does anyone know of a free reporting tool?

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.
We're evaluating Jasper Reports to replace Oracle reports, since we've got some MySQL and Access stuff they want to pull in eventually.

http://www.jasperforge.org/jaspersoft/opensource/business_intelligence/jasperreports/

(By evaluating, I mean trying to convince federal managers that just because it's freeware, doesn't mean it's crap.)

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I have a shell script and at the end of it I want it to echo the time it took to run, how would I do that?

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

fletcher posted:

I have a shell script and at the end of it I want it to echo the time it took to run, how would I do that?

Just run "time ./scriptname.sh" instead of just "./scriptname.sh"

Sergeant Hobo
Jan 7, 2007

Zhu Li, do the thing!
How anal should I be with partitions? Currently, I have a partition for swap and / (with /home on another hard disk entirely). I've heard /boot is handy to have on its own partition. What's the consensus (if there is one)?

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

Sergeant Hobo posted:

How anal should I be with partitions? Currently, I have a partition for swap and / (with /home on another hard disk entirely). I've heard /boot is handy to have on its own partition. What's the consensus (if there is one)?
It can be useful to have /boot in it's own partition for rescue operations, but an OS reinstall is usually faster and easier anyway.

On production servers, I'll often part out /var and /tmp (and sometimes /opt and /u01) as well so I can apply specific mount options (like nosuid,nodev, etc.) and to prevent runaway processes from filling /, and a few other reasons.

For a desktop system, don't worry about it much. Keep /home by itself, and the rest is fine.

bitprophet
Jul 22, 2004
Taco Defender
I actually tend to use the one-big-partition scheme for my production servers, at least lately. I inherited a number of machines when taking my current job, many of which are formatted "the right way"; but I've found that on a lot of those boxes, one partition or another ends up being too small and fills up with legitimate data.

That situation strikes me as equally, or possibly more, messy than the "oh god my drive filled up due to a runaway process" scenario. There's no easy way to address it right away unless the system was set up with extra unpartitioned space, and even then you have to move and/or grow the existing partitions in order to extend the one that's filled up - which is not something I imagine is a good idea to do on a production system.

Or you could add more drives or try to 'spill over' the data into another partition with more space, but those are also less than ideal and could get messy depending on the specific situation at hand. And all of this requires downtime of one kind or another to address.

Yet another reason is that I find it difficult to forecast exactly how much space I'll need in each partition when setting up a machine - I know how configurations and software loadouts change after a system is created, and it seems so arbitrary to guess that I might need 25% in /home and 50% in /var and the other 50% in /, only to find out a year later that no, I actually should've made /var take up 75%...

Finally, if I understand correctly and the issue with a drive getting 100% full is that services will choke, etc, I reckon the chances of that are pretty high even with partitions - e.g. if the machine is a mail or Web server and /var fills up, your mail or Web isn't going to be running all that smoothly - if at all - until the issue is fixed.


So...given all that versus the (in my limited experience, not all that likely, and catchable-before-critical if you use monitoring) chances of a runaway process filling up all free space, is what drives me to say "screw it" and go with the one-big-partition.

The only pressing reason I've heard to the contrary that makes a lot of sense is what chryst mentions about mount options, but again, in my particular scenarios (and at my level of experience :3:) those benefits don't seem to outweigh the headaches of "aw gently caress /var is filling up again, time to find files to remove/archive".

Sorry for the tl;dr. I'd actually like reasoned arguments against my assertions, it's not like I think I'm a hotshot or anything - I've just thought about it a bit, considering the handful of scenarios I've actually experienced, and made what I think's a reasonable decision.

EDIT: In before anyone says LVM - that's actually a decent response to many of my concerns, I'd wager, at least in some situations. So far I only use it for Xen virtual disks, though. Does anyone use it for the whole disk on productions systems?

bitprophet fucked around with this message at 14:55 on Mar 29, 2008

Peanutmonger
Dec 6, 2002

bitprophet posted:

EDIT: In before anyone says LVM - that's actually a decent response to many of my concerns, I'd wager, at least in some situations. So far I only use it for Xen virtual disks, though. Does anyone use it for the whole disk on productions systems?

I have. It honestly really does solve a lot of the problems you described. Especially with ext3 online resizing, it's pretty amazing. `lvresize -L+5G lvname; resize2fs /dev/vg/lvname` is how you add 5 gigs to a given logical volume and have it appear instantly. It lets you be more reactive to the OS' needs, which is the heart of most of your issues. Instead of digging a hole for yourself, you can give the different directories a modest amount of space and leave the extra as slack in the LVM partition. Then you can just grow your partitions as you need to. It's miles beyond juggling actual partitions, and I don't think I could ever go back to that.

If anyone has anything bad to say about LVM (other than "it's not ZFS!"), I'd love to hear it.

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

bitprophet posted:

Yet another reason is that I find it difficult to forecast exactly how much space I'll need in each partition when setting up a machine - I know how configurations and software loadouts change after a system is created, and it seems so arbitrary to guess that I might need 25% in /home and 50% in /var and the other 50% in /, only to find out a year later that no, I actually should've made /var take up 75%...
You're supposed to analyze your needs and the applications you're planning on running before putting a production system online. How do you know your / is big enough in the first place?

quote:

Finally, if I understand correctly and the issue with a drive getting 100% full is that services will choke, etc, I reckon the chances of that are pretty high even with partitions - e.g. if the machine is a mail or Web server and /var fills up, your mail or Web isn't going to be running all that smoothly - if at all - until the issue is fixed.
...
The only pressing reason I've heard to the contrary that makes a lot of sense is what chryst mentions about mount options, but again, in my particular scenarios (and at my level of experience :3:) those benefits don't seem to outweigh the headaches of "aw gently caress /var is filling up again, time to find files to remove/archive".
Filesystem corruption is far more common when a partition gets near capacity. *especially* on mail or source control systems, where there can be millions of tiny files using up all of your inodes. It's much easier to repair if / is intact, because at least then you can still boot single-user.

Which brings up another issue, that of inodes and block use. Parting out provides you with the ability to cram more inodes on the disk, and you can use different block sizes for performance/space tradeoffs, depending on the apps. As well as using a different Filesystem type. Root's always ext3. Mail, Documentum, HTML, etc is Reiser. Oracle is OCFS or ext3 with a 32k block size, etc. At least IMO.

quote:

EDIT: In before anyone says LVM - that's actually a decent response to many of my concerns, I'd wager, at least in some situations. So far I only use it for Xen virtual disks, though. Does anyone use it for the whole disk on productions systems?
LVM is unsafe on root IMO. You need additional drivers and such loaded by initrd to use it. I've been burned from striping root using Solaris Volume Management before, and LVM isn't a lot different. Mirroring is a good idea, since you can still boot single with some grub tweaks, but if you need to expand root via LVM, it's risky.

bitprophet
Jul 22, 2004
Taco Defender

Peanutmonger posted:

LVM

FWIW I've done exactly what you describe, just for Xen virtual disks, like I said. It is pretty painless and nice, although I'd be a little leery of using it for the root of a system, partly because I figured there'd be cautionary tales like chryst's:

chryst posted:

LVM is unsafe on root IMO. You need additional drivers and such loaded by initrd to use it. [...] Mirroring is a good idea, since you can still boot single with some grub tweaks [...]

That makes sense; what's your opinion on using software RAID on the root volume? It's a similar setup - you need the drivers available at boot - and (I just committed this potential sin recently) in my case it was largely unavoidable as I had to do it on a 1U server with only room for a single H/W RAID card - for an external array, so I couldn't use it on the internal disks.

I also read recently that combining RAID and LVM can sometimes lead to serious issues, curious if anyone's run into that themselves.

chryst posted:

You're supposed to analyze your needs and the applications you're planning on running before putting a production system online. How do you know your / is big enough in the first place?

Absolutely true; sadly being a sysadmin is only 50% of my job description right now (and given that the other 50% is programming, that means that practically 90% of my actual time is spent coding or supporting coding :() and I'm still a greenhorn in terms of doing it professionally, so I have neither the time nor the practical experience to seriously sit down and do the analysis needed for each system (except for huge-outlay, lots-of-data-to-draw-upon stuff like aforementioned backup array).

I do a ballpark estimate, get the next drive size up from that, and hope that's good enough. Ironically I'm still more analytical and thorough in my planning than my employer has seen previously - the setup here is a bit of a mess that's grown organically and piecemeal over a decade+. One reason I actually jumped at the chance to take this responsibility on, it'll give me a chance to learn while pleasing my inner techno-neatfreak.

other people
Jun 27, 2004
Associate Christ
I am copying a bunch of directories/files to a SD card. It chokes every time it hits a name with dos special characters.

Is there a way to copy these files directly and have the special characters removed on the fly when needed?

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

bitprophet posted:

That makes sense; what's your opinion on using software RAID on the root volume?
I don't like to do anything but RAID1 with my root partition, and I *much* prefer a hardware mirror. Like I said, striping is dangerous, and repair difficult. You still need to make sure that your single-user image will load the modules either compiled in, or in initrd.

quote:

I had to do it on a 1U server with only room for a single H/W RAID card - for an external array, so I couldn't use it on the internal disks.
If it was my box, and I had the external array, I'd be booting off that array. (assuming the array had some hardware redundancy.)
If for whatever reason that didn't make sense, I'd be using LVM to mirror the root partitions between the disks.

quote:

I also read recently that combining RAID and LVM can sometimes lead to serious issues, curious if anyone's run into that themselves.
LVM, being a pretty complete volume manager can be used for RAID. You don't want to set up a simple RAID and then start playing with pools on top of it, or start trying to RAID your pools or anything. But once you understand how LVM actually works, these usually aren't problems.

quote:

the setup here is a bit of a mess that's grown organically and piecemeal over a decade+.
And networks get like this when they break my cardinal rule: Never give developers root, and never make them the sysadmins. :) I kid. I know smaller shops can't split tasks so much. Really though, if you can, you can learn a ton by planning a way to take your current network and make it streamlined and well managed, without incurring serious downtime. It's a great way to become a pretty well rounded admin pretty quick.

Mr. Eric Praline fucked around with this message at 05:40 on Mar 30, 2008

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

Kaluza-Klein posted:

I am copying a bunch of directories/files to a SD card. It chokes every time it hits a name with dos special characters.

Is there a way to copy these files directly and have the special characters removed on the fly when needed?

How are you copying? A simple glob like * should copy special characters just fine.

To replace them, look into the "tr" command.

Basically something like

code:
for i in `ls`; do 
fname="$(basename $i)" 
nname="/path/you/are/copying/to/$(echo $fname| tr 'weird character' '_')" 
cp $fname $nname; done
This won't work recursively, but shouldn't be hard to do it with find instead of ls.
I don't recall offhand, but the tr man page should show you how to specify the weird character.

Mr. Eric Praline fucked around with this message at 05:36 on Mar 30, 2008

other people
Jun 27, 2004
Associate Christ

chryst posted:

How are you copying? A simple glob like * should copy special characters just fine.

To replace them, look into the "tr" command.

Basically something like

code:
for i in `ls`; do 
fname="$(basename $i)" 
nname="$(echo $fname| tr 'weird character' '_')" 
mv $fname $nname; done
I don't recall offhand, but the tr man page should show you how to specify the weird character.

I am just doing cp -r /dir .

Some folder/file names have colons, questions marks, and umlauts etc. The command stops on just about anything that isn't a standard english letter or number.

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

Kaluza-Klein posted:

I am just doing cp -r /dir .

Some folder/file names have colons, questions marks, and umlauts etc. The command stops on just about anything that isn't a standard english letter or number.
Odd. I've seen older shells choke on stuff like unicode, but the glob should get them in a newer bash.

Regardless, the tr should work, tho you might need to get more creative with it than above.

Scaevolus
Apr 16, 2007

Kaluza-Klein posted:

I am copying a bunch of directories/files to a SD card. It chokes every time it hits a name with dos special characters.

Is there a way to copy these files directly and have the special characters removed on the fly when needed?
Try mounting the SD card with '-o iocharset=utf8'

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Scaevolus posted:

Try mounting the SD card with '-o iocharset=utf8'

And make sure it's mounted as vfat and not something crazy like msdos.

Poor Mans Randbrick
Feb 18, 2007

I just bought a pair of USB headphones that work fine in my windows partition but don't work in ubuntu; the ubuntu forums couldn't help and googling turns up nothing but product placements. Anyone know how to get them to work?

Scaevolus
Apr 16, 2007

Hrolf Pyjama posted:

I just bought a pair of USB headphones that work fine in my windows partition but don't work in ubuntu; the ubuntu forums couldn't help and googling turns up nothing but product placements. Anyone know how to get them to work?

Manufacturer and model number would be useful.

Poor Mans Randbrick
Feb 18, 2007

Scaevolus posted:

Manufacturer and model number would be useful.

Nexxtech, not sure about the model number.

bootleg robot
Dec 8, 2004

I have a basic question about installing from source. I downloaded an application from subversion (svn co url). Then configured, compiled, then installed it. Now, suppose there is a new revision up. The correct way to retrieve it is "svn update", right? What do I do from there in terms of configuring, compiling, and installing? Do I need to uninstall the old version first?

tehk
Mar 10, 2006

[-4] Flaw: Heart Broken - Tehk is extremely lonely. The Gay Empire's ultimate weapon finds it hard to have time for love.

bootleg robot posted:

I have a basic question about installing from source. I downloaded an application from subversion (svn co url). Then configured, compiled, then installed it. Now, suppose there is a new revision up. The correct way to retrieve it is "svn update", right? What do I do from there in terms of configuring, compiling, and installing? Do I need to uninstall the old version first?

I would do a 'make uninstall' then update the source and do the install steps as usual. You could just install it on top of the old one but to avoid files that have been removed for that revision remaining behind I would uninstall it first.

Feral Integral
Jun 6, 2006

YOSPOS

I want to back up my music directory to a server on another computer. Right now I have a bunch of songs organized into folders (shoddily) by artist name. What I wan't to do is just find all the mp3's and copy them into one folder on my backup server. The command I tried was:

find /Music -name *.mp3 | scp user@backupserver:~/music

this doesn't really work at all :/ . What would you guys suggest?

crab avatar
Mar 15, 2006

iŧ Kë3Ł, cħ gøÐ i- <Ecl8

Feral Integral posted:

I want to back up my music directory to a server on another computer. Right now I have a bunch of songs organized into folders (shoddily) by artist name. What I wan't to do is just find all the mp3's and copy them into one folder on my backup server. The command I tried was:

find /Music -name *.mp3 | scp user@backupserver:~/music

this doesn't really work at all :/ . What would you guys suggest?

I'd use rsync. It's fairly trivial to set it up, and it's a lot faster for files that don't change much since it only transfers the delta.

covener
Jan 10, 2004

You know, for kids!

Feral Integral posted:

I want to back up my music directory to a server on another computer. Right now I have a bunch of songs organized into folders (shoddily) by artist name. What I wan't to do is just find all the mp3's and copy them into one folder on my backup server. The command I tried was:

find /Music -name *.mp3 | scp user@backupserver:~/music

this doesn't really work at all :/ . What would you guys suggest?

better advice above, this particular command should have used xargs or put the find on the other side of the scp ( scp ... $(find ...) user@...)

bitprophet
Jul 22, 2004
Taco Defender

chryst posted:

And networks get like this when they break my cardinal rule: Never give developers root, and never make them the sysadmins. :) I kid.

I actually sort of agree with you - I've always considered myself to be half a sysadmin, and certainly have been far more interested in systems work than most other coder types I know. A couple of the programmers at my work fancy themselves good with systems but don't really know that much; for example, one of them decided it would be a good idea to run a full apt-get upgrade (at about 4pm on a workday, natch) on the mail/web server "just to get it up to date", and of course it didn't come up after he rebooted it (grub issues). That was shortly after I arrived and before I had gotten up to speed on things / taken full responsibility...needless to say I don't let him do that anymore :rolleyes:

But, yea, aside from a bit of help they got from a consulting firm here and there, that was the story of the network and servers here. No real backups, no monitoring of any sort, no security policies, the list goes on...I'll have Bacula running in a month's time, with Nagios to follow after that, and so forth.

quote:

I know smaller shops can't split tasks so much. Really though, if you can, you can learn a ton by planning a way to take your current network and make it streamlined and well managed, without incurring serious downtime. It's a great way to become a pretty well rounded admin pretty quick.

That's what I'm hoping for :) I've been administering systems at a hobbyist level for years, so this is my first real chance to deal with real issues and not the ad-hoc "eh whatever" attitude that arises from being your only user.

Alowishus
Jan 8, 2002

My name is Mud

Feral Integral posted:

find /Music -name *.mp3 | scp user@backupserver:~/music

this doesn't really work at all :/ . What would you guys suggest?
First problem is that you should quote the wildcard in find.

Second problem is that your MP3 files probably have spaces in them, so you'll need to account for that with find.

Third problem is that you're only piping a big chunk of text to scp... it doesn't know that it's supposed to be a list of files to copy. You need xargs for this.

Here's what it should look like:
code:
find /Music -name '*.mp3' -print0 | xargs -0 -I '{}' scp '{}' user@backupserver:~/music/
So it's going to find all .mp3 files in /Music, and print the list out in a tab delimited format instead of space delimited (so that spaces in filenames don't throw it off). xargs is a utility that takes batches of file names from find and executes a command on that list of files. In this case, your list of files is going to be the source, not the destination, so you need to use the {} substitution method, otherwise xargs will put your file at the end of the command, which would be backward.

Rsync is still probably the better approach but thought I'd help with the method you were trying too. Do realize that this will effectively "flatten" any directory structure you had in your /Music folder when it reaches the backup server.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

bootleg robot posted:

I have a basic question about installing from source. I downloaded an application from subversion (svn co url). Then configured, compiled, then installed it. Now, suppose there is a new revision up. The correct way to retrieve it is "svn update", right? What do I do from there in terms of configuring, compiling, and installing? Do I need to uninstall the old version first?

Like the guy said, "make uninstall" first, if you're lucky. If not, the jackass who wrote it didn't bother coding "make uninstall" and you'll have to just "make install" the new version on top of the old one and hope nothing gets hosed up.

"checkinstall" is an awesome program to use in the future (too late now, though). It basically does the "make install" step into a scratch directory, and turns the result into an RPM or Debian package (plus about a hundred lesser-known formats, I believe) so you can use your standard package-management tools to install and uninstall it.

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

JoeNotCharles posted:

Like the guy said, "make uninstall" first, if you're lucky. If not, the jackass who wrote it didn't bother coding "make uninstall" and you'll have to just "make install" the new version on top of the old one and hope nothing gets hosed up.

A relatively easy way around this is by using the --prefix switch on configure.

./configure --prefix=/opt/new_software/ will put everything under that directory. Uninstallation should be a simple matter of deleting it at that point.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

chryst posted:

A relatively easy way around this is by using the --prefix switch on configure.

./configure --prefix=/opt/new_software/ will put everything under that directory. Uninstallation should be a simple matter of deleting it at that point.

Then you have to add /opt/new_software/bin to your path, and /opt/new_software/lib to your library path, and... Like it or not, /opt just isn't the Linux way.

Feral Integral
Jun 6, 2006

YOSPOS

Alowishus posted:

First problem is that you should quote the wildcard in find.

Second problem is that your MP3 files probably have spaces in them, so you'll need to account for that with find.

Third problem is that you're only piping a big chunk of text to scp... it doesn't know that it's supposed to be a list of files to copy. You need xargs for this.

Here's what it should look like:
code:
find /Music -name '*.mp3' -print0 | xargs -0 -I '{}' scp '{}' user@backupserver:~/music/
So it's going to find all .mp3 files in /Music, and print the list out in a tab delimited format instead of space delimited (so that spaces in filenames don't throw it off). xargs is a utility that takes batches of file names from find and executes a command on that list of files. In this case, your list of files is going to be the source, not the destination, so you need to use the {} substitution method, otherwise xargs will put your file at the end of the command, which would be backward.

Rsync is still probably the better approach but thought I'd help with the method you were trying too. Do realize that this will effectively "flatten" any directory structure you had in your /Music folder when it reaches the backup server.

Thank's that's exactly what I was looking for :)

bootleg robot
Dec 8, 2004

JoeNotCharles posted:

Like the guy said, "make uninstall" first, if you're lucky. If not, the jackass who wrote it didn't bother coding "make uninstall" and you'll have to just "make install" the new version on top of the old one and hope nothing gets hosed up.

"checkinstall" is an awesome program to use in the future (too late now, though). It basically does the "make install" step into a scratch directory, and turns the result into an RPM or Debian package (plus about a hundred lesser-known formats, I believe) so you can use your standard package-management tools to install and uninstall it.

That is really cool. Thanks for your help, guys.

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

JoeNotCharles posted:

Then you have to add /opt/new_software/bin to your path, and /opt/new_software/lib to your library path, and... Like it or not, /opt just isn't the Linux way.
Well, yes. But the same goes for using prefix=/usr/local/new_software, and --prefix=/usr/local undermines my earlier point. So it's not /opt's fault.

Green Puddin
Mar 30, 2008

So I can just throw my question here, right?

Alright. For starters, it seems like PClinuxOS (yes, I know, it's an idiots OS but I'm not exactly a technical wizard) doesn't want to recognize my fire wire DVD drive. It always seemed to work (the PCI fire wire card) in openSuSE, Ubuntu (I don't want to go back to Ubuntu again, ugh) and basically everything else that's ever had the pleasure to be my OS.

Another problem - I'm trying to convert an .avi file into a .iso file to make into a DVD I can watch on my DVD players around the house; so it would seem like DeVeDe would be the ideal program for this, right? And by default, PClinuxOS comes with DeVeDe, so I didn't have to waste a few clicks in the Synaptic Package Manager. The thing is, though, is that when I try and get the encoding started, I'm presented with a an error that states (and I'm literally serious in what it's saying):

Conversion failed.
It seems a bug of Mencoder.

"It seems a bug of Mencoder". Wow... Uh, ok, so I checked out Mencoder and it's the latest version along with DeVeDe being the latest version.

I really don't want to go back to Ubuntu, but it seems like the only distro that will do what I want it to do... Unless I can get these two little things cleared up...

skipdogg
Nov 29, 2004
Resident SRT-4 Expert

I have 2 text files on a redhat 4 machine, and I'd like to merge the two of them while deleting and duplicates.

newdomains and domains. It's a file for a squidguard list so each item is on it's own line. Is there a way I can add the contents of newdomains, to domains without duplicates?

I could just move the files over to my windows machine and do it in notepad and move them back, but I'm learning trying to learn how to do things the right way in linux.

covener
Jan 10, 2004

You know, for kids!

skipdogg posted:

I have 2 text files on a redhat 4 machine, and I'd like to merge the two of them while deleting and duplicates.

newdomains and domains. It's a file for a squidguard list so each item is on it's own line. Is there a way I can add the contents of newdomains, to domains without duplicates?

I could just move the files over to my windows machine and do it in notepad and move them back, but I'm learning trying to learn how to do things the right way in linux.

If the order is insignificant, sort domains newdomains | uniq > combined.txt

Preserving the order is a little less neat, you'd have to do a little more work in a script.

skipdogg
Nov 29, 2004
Resident SRT-4 Expert

covener posted:

If the order is insignificant, sort domains newdomains | uniq > combined.txt

Preserving the order is a little less neat, you'd have to do a little more work in a script.

Thanks!

edit: It worked perfect.

skipdogg fucked around with this message at 18:15 on Mar 31, 2008

Adbot
ADBOT LOVES YOU

There Will Be Penalty
May 18, 2002

Makes a great pet!

JoeNotCharles posted:

Then you have to add /opt/new_software/bin to your path, and /opt/new_software/lib to your library path, and...

Not if you use GNU Stow.

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