|
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 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.
|
# ? Mar 28, 2008 03:30 |
|
|
# ? Apr 26, 2024 02:06 |
|
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? you can also do cd "/music/Jack Johnson"
|
# ? Mar 28, 2008 05:48 |
|
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?
|
# ? Mar 28, 2008 16:21 |
|
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.)
|
# ? Mar 28, 2008 17:08 |
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?
|
|
# ? Mar 28, 2008 23:09 |
|
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"
|
# ? Mar 28, 2008 23:34 |
|
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)?
|
# ? Mar 29, 2008 03:40 |
|
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)? 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.
|
# ? Mar 29, 2008 04:13 |
|
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 ) 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 |
# ? Mar 29, 2008 14:52 |
|
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.
|
# ? Mar 29, 2008 15:44 |
|
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%... 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. 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?
|
# ? Mar 29, 2008 15:45 |
|
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.
|
# ? Mar 29, 2008 17:40 |
|
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?
|
# ? Mar 30, 2008 02:05 |
|
bitprophet posted:That makes sense; what's your opinion on using software RAID on the root volume? 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 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. quote:the setup here is a bit of a mess that's grown organically and piecemeal over a decade+. Mr. Eric Praline fucked around with this message at 05:40 on Mar 30, 2008 |
# ? Mar 30, 2008 05:18 |
|
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. 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:
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 |
# ? Mar 30, 2008 05:34 |
|
chryst posted:How are you copying? A simple glob like * should copy special characters just fine. 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.
|
# ? Mar 30, 2008 05:40 |
|
Kaluza-Klein posted:I am just doing cp -r /dir . Regardless, the tr should work, tho you might need to get more creative with it than above.
|
# ? Mar 30, 2008 05:49 |
|
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.
|
# ? Mar 30, 2008 06:35 |
|
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.
|
# ? Mar 30, 2008 06:37 |
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?
|
|
# ? Mar 30, 2008 06:45 |
|
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.
|
# ? Mar 30, 2008 06:52 |
Scaevolus posted:Manufacturer and model number would be useful. Nexxtech, not sure about the model number.
|
|
# ? Mar 30, 2008 06:55 |
|
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?
|
# ? Mar 30, 2008 07:24 |
|
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.
|
# ? Mar 30, 2008 07:56 |
|
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?
|
# ? Mar 30, 2008 11:53 |
|
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: 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.
|
# ? Mar 30, 2008 12:26 |
|
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: better advice above, this particular command should have used xargs or put the find on the other side of the scp ( scp ... $(find ...) user@...)
|
# ? Mar 30, 2008 13:36 |
|
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 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.
|
# ? Mar 30, 2008 15:45 |
|
Feral Integral posted:find /Music -name *.mp3 | scp user@backupserver:~/music 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:
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.
|
# ? Mar 30, 2008 18:41 |
|
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.
|
# ? Mar 30, 2008 18:51 |
|
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.
|
# ? Mar 30, 2008 19:06 |
|
chryst posted:A relatively easy way around this is by using the --prefix switch on configure. 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.
|
# ? Mar 30, 2008 19:16 |
|
Alowishus posted:First problem is that you should quote the wildcard in find. Thank's that's exactly what I was looking for
|
# ? Mar 30, 2008 19:31 |
|
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. That is really cool. Thanks for your help, guys.
|
# ? Mar 30, 2008 20:12 |
|
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.
|
# ? Mar 30, 2008 20:14 |
|
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...
|
# ? Mar 30, 2008 21:24 |
|
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.
|
# ? Mar 31, 2008 17:32 |
|
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. 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.
|
# ? Mar 31, 2008 17:35 |
|
covener posted:If the order is insignificant, sort domains newdomains | uniq > combined.txt Thanks! edit: It worked perfect. skipdogg fucked around with this message at 18:15 on Mar 31, 2008 |
# ? Mar 31, 2008 18:05 |
|
|
# ? Apr 26, 2024 02:06 |
|
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.
|
# ? Mar 31, 2008 18:38 |