|
After being very happy I'm learning *nix pretty effectively, and am getting more and more comfortable with the command line, I find out egrep (yeah yeah, grep -E, whatever Fedora I don't care if it's deprecated) does not support grouping like I thought it did. I had a long list of numbers I needed surrounded by some letters (ABCD123DC ...), so I run:code:
After googling for answers to no avail, I come up with this hack: code:
|
# ¿ Dec 16, 2010 02:42 |
|
|
# ¿ Apr 19, 2024 02:01 |
|
ToxicFrog posted:$1 doesn't mean what you think it does - it's "the first argument to this shell script or function". It doesn't magically change because you ran another program. While other programs (like awk) may use it to mean different things, the shell doesn't know about those other meanings, nor does it retain those meanings when used outside those programs. Makes sense, and thanks for the info. I couldn't find any info about using results from regex grouping and grep so this actually clears up some of my earlier confusion. (Curse you DOS for storing variables until the prompt is closed. ) [/quote] quote:If it's too complicated for that, on generally writes a small script, either in bash itself or in something like awk or perl. Erasmus Darwin posted:Try this: The perl suggestion is a great idea, since I use regex searches pretty extensively, and I'm more familiar with Perl's regex syntax than grep. Thanks for the help!
|
# ¿ Dec 16, 2010 04:37 |
|
After a modestly intelligent discussion on regex and grouping with egrep, today I made a pretty dumb mistake while being compltely absentminded. I was trying to make my samba share easier to access when using the gui file explorer...code:
It worked, and I got single user mode back from graphic corruption! I know I'm doing way better with linux when I can recover from dumb poo poo like the above. A few years ago I would have said "gently caress it" and just installed windows.
|
# ¿ Dec 17, 2010 06:27 |
|
Ah, my misunderstanding of how --bind works. Thanks for clearing that up!
|
# ¿ Dec 17, 2010 17:46 |
|
I installed Fedora 14 on my eeePC netbook at home and had literally 0 problems with drivers or otherwise. Fedora has proprietary drivers if you enable the non-free yum repository, should things not work out of the box. Also, if you need to use RDP for work, I'd highly, highly recommend Remmina. I'm not sure what Ubuntu has installed by default for remote desktop (VNC or otherwise) but I know vinagre is the default on Fedora and it's a total piece of poo poo, and doesn't even support RDP out of the box to boot. Unrelated, if I were interested in becoming a *nix sysadmin down the road what would be the best way to make myself qualified for the job? I don't have a college degree to prop up my resume, so I'm assuming I would need a few certs. I'm not a linux guru by any means, and only started using it on a very regular basis within the last 6 months, so obviously continuing to use it and work with it is going to only increase with time, but I definitely want to learn faster than waiting to make mistakes and puzzling out how to fix them. I guess the question really is, should I focus on official qualifications (e.g. certifications), or should I be immersing myself in linux, learning as much as I can, and worrying about the qualifications down the road? Maybe there's something else I'm not thinking of or don't know about, but feedback/advice is greatly appreciated.
|
# ¿ Jan 11, 2011 22:06 |
|
rt4 posted:Run Linux at home and solve as many problems as possible with no GUI (except a web browser for documentation reference). Type some long commands involving grep and xargs or maybe parallel for bonus points. Do some shell scripting. Learn Perl; you will encounter it eventually and it might be a quick fix in some stick situations. Bob Morales posted:Do you have a little bit of money? Thanks for the very useful advice, both of you! I started doing a little bit of learning-at-home by turning my netbook into an ssh/vnc/general purpose box I can access at work, (Been super useful using nmap outside of my work network for troubleshooting connectivity issues with clients.) but what you guys are saying I should do is a bit more focused, and that's exactly what I need. I do have a bit of money to sling around, and I really like the idea of setting up a few servers at home to toy around with. If I got two of something like this, ($210 one) what I should be going for? The $210 one doesn't have a redundant power supply, but I obviously wouldn't be using them as production servers so I'm not too concerned. If I'm going to spend this much money, is there some place online I should look at that has comparable prices, or is CL my best shot? In terms of the immersion, I'm already getting to a point where I would much prefer using a CLI than a GUI configuration tool. I'm definitely lacking in terms of utilizing the power *nix shells provide, but part of the reason I think I want to do *nix admining is because I see the potential of working almost exclusively with a command line. I checked out that Unix Power Tools book, and it looks incredibly interesting so I'll be picking that up at some point. There's a lot of other stuff you both have mentioned that I've started doing but haven't gone far with, but that was the point of coming here, to make sure I'm heading in the right direction while getting some new ideas. On a tangent, I've heard the age old adage, "If you learn RedHat/Fedora/Suse/Mandriva, you know RedHat/Fedora/Suse/Mandriva. If you learn Slackware you know Linux." and I'm curious if it'd be worthwhile to play with Slackware, or should I save that for down the road when I've got some more experience under my belt and it won't be so frustrating? Also, learning with SELinux enabled, yea or nay? I have it enabled on both of my Fedora machines, but it's definitely caused some headaches. Documentation is thorough at least...
|
# ¿ Jan 12, 2011 02:23 |
|
I have a few weird graphic corruption issues with the proprietary ATI driver on Fedora, if that's what you're using. It's a huge piece of poo poo and sets off SELinux like nothing else I've seen.
|
# ¿ Jan 13, 2011 01:39 |
|
I'm not at my computer at home, which has OS X, but I can tell you that terminal on OS X seems to do everything the opposite of how everybody else does it. That being said, check out tset.
|
# ¿ Jan 19, 2011 02:15 |
|
So I'm going through Linux from Scratch at the moment, and I'm learning quite a bit. I'm finding it hilarious how inconsistent the book is at explaining what you're doing. It just coddled me through a "for" loop, but doesn't even bother to explain what the actual purpose of linkers and loaders are, and doesn't hesitate to reference them every paragraph. You also never have to figure out a command for yourself, but when instructing you to perform a sanity check:quote:If the output is not shown as above or there was no output at all, then something is wrong. Investigate and retrace the steps to find out where the problem is and correct it. This issue must be resolved before continuing on. Something may have gone wrong with the specs file amendment above. In this case, redo the specs file amendment, being careful to copy-and-paste the commands. Yeah hang on and let me just "find out what the problem is." Thanks book. Getting annoying having to type all these commands in, since I'm building from a the LFS Live CD and a virtual machine. Makes it slightly stressful because one typo and I might have to start over. I have no idea how to troubleshoot and resolve issues, and google results for a couple of issues I had early on returned no fruitful results.
|
# ¿ Jan 29, 2011 06:49 |
|
BagelMaster posted:So I want to run a headless Ubuntu box. The problem is, I want to be able to VNC into it, especially for my roommates who are interested in linux but are too overwhelmed to only use SSH. Without any inputs into the machine, I can't seem to get VNC to work. I'm assuming it's because I haven't actually logged in and started up a desktop session, so there's nothing to show, thus rendering VNC useless. Is there an easy way around this? I actually just had this issue with a Fedora 14 install. The issue is that VNC is installed to only allow viewing of the current desktop session, as you said yourself. What you need to do is set up vncserver to use its own desktop session. For instance, when I connect to my Fedora box on port 5901, I get a gnome session on display 1 that is separate from the one you would get sitting at the computer. I'm recanting this off the top of my head with a couple of quick google searches supplmenting, and I used tigervnc, so I'm not sure if this is right, but it should put you in the right direction. You may need to install another package or two, I know I had to with tigervnc-server: In /etc/sysconfig/vncservers: code:
code:
After that's done, you can connect to 5901 for the vnc session. You can add other users so they get their own VNC sessions on 590X, where X corresponds with the display you specified in /etc/sysconfig/vncservers.
|
# ¿ Jan 31, 2011 21:26 |
|
I've been using Linux on a daily basis for 6 months or so now, and I still don't remember the syntax to anything.waffle iron posted:It's easy, you just have to remember that it's the same order of arguments as cp. I love you so much. Why did I not make that connection myself?
|
# ¿ Feb 1, 2011 02:16 |
|
Erm, shouldn't take more than a few minutes to get regex going for the "FN:MISTER DUDER" part. Not sure how to only extract the first part of the file and ignore the rest, but here's your regex:code:
|
# ¿ Feb 1, 2011 20:34 |
|
Just got my LFS system to boot for the first time! Pretty loving happy, since I was so pessimistic thinking I'd never get it to work!
|
# ¿ Feb 3, 2011 17:27 |
|
It's only as much of a learning experience as you make it to be. You're not going to learn anything if you just type the commands in as instructed. The cool part is you get to see where each of those utilities and commands you use every day come from. I was already pretty overwhelmed working through it, so I didn't spend as much time learning about things as I should have, but I plan on doing it again, or at least with slax, on the HP rack server I have, and taking the time to really learn about what I'm doing. I did, however, get a feel for exactly how linux works. There's a lot I did learn that's immediately applicable and going to help me out tremendously. It is really tedious, but I was playing a shitload of Monday Night Combat while waiting for poo poo to compile over the weekend. The tediousness did get to me, and I was really only an hour, hour and a half away from being finished, but after working on it for like 15-20 hours over the weekend, I had to take a break because I was so overwhelmed. That's why I finished today, and not Sunday night.
|
# ¿ Feb 3, 2011 19:18 |
|
waffle iron posted:I see Linux From Scratch as "how to use GNU autotools". Which in the scheme of things isn't a huge deal. Thanks for trying to diminish what I thought was an accomplishment, but there's more to it than that! LFS on its own isn't designed to be the end-all resource for learning Linux. In fact, it's designed to be a introduction and a leaping point for Beyond LFS which includes most packages that come with modern Linux distros.
|
# ¿ Feb 4, 2011 03:41 |
|
Have you tried booting from rescue mode? Guide here.
|
# ¿ Feb 4, 2011 20:07 |
|
Can you copy and paste the contents of /etc/samba/smb.conf?
|
# ¿ Feb 4, 2011 21:46 |
|
You should reread this:spoon0042 posted:In your case you either need to change the group of LVM Pool and set it to (at least) 710, or set it to 711 without changing the group.
|
# ¿ Feb 5, 2011 01:06 |
|
Try 751. fake edit: If that doesn't work, try 771, then 775. You should avoid using 777 if possible.
|
# ¿ Feb 5, 2011 01:16 |
|
General_Failure posted:
Two pages back champ: http://forums.somethingawful.com/showthread.php?threadid=2389159&userid=0&perpage=40&pagenumber=213#post387567497
|
# ¿ Feb 9, 2011 01:14 |
|
Misogynist posted:find /path/to/backups -type f -mtime +365 -exec rm -f {} + Trying to figure this one out because I haven't used find like this, and I'm curious about a few things: "-mtime +365" is saying only include files modified more than 365 * 24 hours ago, right? Could I use -mtime -7, for example? "rm -f {} +" This part I get, delete with no prompt all matching files, but I'm not sure what the '+' is used for here. The examples I see have the curly braces single quoted, but maybe it has to do with the use of the '+'?
|
# ¿ Feb 10, 2011 21:30 |
|
Does it work if he uses the full path? e.g. /sbin/init?
|
# ¿ Feb 25, 2011 08:00 |
|
Dotcom656 posted:So I've been convinced to try running a Linux distro on my laptop and the only thing I have around is a 2GB flash drive. Make sure the stick isn't faulty. I was struggling with a 2gb stick on and off for a month, trying to figure out why, no matter what I did, it wouldn't properly boot. I tried a different stick and immediately was able to get it up and running. I would have beaten myself up if it were physical possible, If that's not possible, try UNetbootin which is what I used to make a bootable Fedora stick in Windows.
|
# ¿ Mar 11, 2011 02:34 |
|
Dotcom656 posted:I don't think the stick is faulty. and I tried netbootin and nothing changed. I don't have another flash drive to try so I'll see if I can use a live CD from the computing lab tomorrow. I did a google search for "GTS360m ubuntu" and this was the first result: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/657736 Comment #38: Marius Kruger posted:> Is it any way to enable safe video mode for installer? The very last comment on the page mentions installing additional drivers. I'm guessing these are the proprietary Nvidia drivers, and you can google around for a guide. If you're going to start using Linux, get used to googling extensively for solutions to problems.
|
# ¿ Mar 11, 2011 03:02 |
|
Third google result for "openvpn": http://openvpn.net/index.php/open-source/documentation/howto.html
|
# ¿ Mar 14, 2011 23:23 |
|
Sizzlechest posted:A google search tells me the best way to do it? Because if that's what you just did to come up with that recommendation, please stop posting. No, but if you said "what's the best way" instead of saying, "I'm reading you can use $method_a or $method_b, but I don't know if those will work. Anybody know the best way?" The second way shows you did at least a ten second google search. The way you asked the question is just begging for hand-holding. You couldn't have spent more than 20 seconds writing that post, so you're going to tell people to gently caress off when they don't spend more than 20 seconds replying to yours?
|
# ¿ Mar 17, 2011 18:27 |
|
I don't know if anybody here has any experience with Cassandra, but I'm getting pretty frustrated. I've been messing around with some stuff and decided to set up a Reddit clone and hopefully learn something in the process. On my Debian 6 server, I can get the Cassandra daemon to run just fine. I can connect to the instance with casssandra-cli, but for some reason it isn't loading the keyspace defined in /etc/cassandra/cassandra.yaml. I'm really not sure what I'm supposed to do next, because from my understanding that's all I need to do. I've been searching around, and I saw a reference to LiveSchemaUpdates, but I can't find anything about why the keyspace isn't important from the YAML file.
|
# ¿ Mar 19, 2011 22:52 |
|
TheGopher posted:I don't know if anybody here has any experience with Cassandra, but I'm getting pretty frustrated. I've been messing around with some stuff and decided to set up a Reddit clone and hopefully learn something in the process. I figured this out. Issue was I thought schematool HOST PORT import uses JMX, not RMI, and as such needs to connect on port 8080, not 9160... Yeah I don't really know what the gently caress I'm doing. At least I'm learning something about Cassandra...
|
# ¿ Mar 20, 2011 03:03 |
|
Any reason you can't just run the script like: ./script.sh &
|
# ¿ Apr 21, 2011 22:02 |
|
Not sure what filesystem it needs to mount, but FreeBSD has a SPARC64 Live CD. If the machine is 32-bit SPARC that will be trickier. OpenBSD is only one of two *nix distributions that still has 32-bit SPARC support, and I can't remember the other: OpenBSD 4.8 here.
|
# ¿ Apr 25, 2011 22:24 |
|
Crackbone posted:Having a samba nightmare. Not accessible is a permissions error. Check the logs for more info, and try using SWAT if you're having a lot of trouble. I can post my smb.conf once I'm at work, as that machine is running Fedora 13 and hosts a share as you describe.
|
# ¿ Apr 26, 2011 17:15 |
|
The following works on my Fedora 13 machines with samba-3.5.8-74.fc13.i686.code:
# ls -ld share drwxrwxrwx. 24 $user root 4096 Apr 19 17:05 share I probably could do better with those permissions, but I'm not too concerned as this is not a public-facing terminal and I was having difficulties getting it to work.
|
# ¿ Apr 26, 2011 21:06 |
|
Crackbone posted:Thanks for the config, I'll give it a shot. Did you have any issues with SELinux settings? Coworking is swearing up and down that's part of the problem. I disabled SELinux because I finally got fed up with dealing with it and the lovely proprietary ATI driver. That being said, SELinux should not be an issue, as those settings were working fine without fiddling with SELinux before I disabled it. (Make sure you change $local_ip to your actual local IP address if you didn't know already)
|
# ¿ Apr 26, 2011 22:34 |
|
I just want to share my most recent accomplishment with people that might actually understand what I'm talking about. Was getting annoyed with a pretty outdated version of Remmina on Fedora, so I downloaded the source and built the RPM myself! Promptly afterwards I had to delete it and reinstall the old version because 0.9.3 doesn't come with the VNC plugin by default, and I had work to do. I'm trying to make a spec file for the plugins package, but I was able to rely on the existing spec file for the previous RPM build, but after playing with it so far it doesn't seem particularly tricky.
|
# ¿ Apr 29, 2011 23:13 |
|
All the cool kids are using Arch in general, but not sure about specifically for KDE. Fedora is alright, and comes with good KDE support, but after using it daily for almost a year now my main gripes with it come from it not getting as much attention and support as Debian/Ubuntu. I've only ever used Gnome, so I can't really speak about KDE. Each time I've tried KDE however, there was nothing about it that's really stood out to me as a reason to switch to it from Gnome. I don't need much fancy or flashy functionality out of my GUI, and besides OpenOffice, Pidgin, Remmina, a mail client, and Chrome, I don't really need a GUI.
|
# ¿ May 4, 2011 02:33 |
|
Bob Morales posted:I just had F14 the way I wanted it with GNOME. But it just feels so...old. I honestly haven't given KDE a whirl in a very long time. Like since Caldera or something ancient. Yeah I know what you mean with it feeling old, but after awhile you stop noticing the aesthetics and solely focus on the functionality anyway. Besides, if I were going to use an OS for "pretty" factor I would use OS X.
|
# ¿ May 4, 2011 04:20 |
|
I prefer:code:
|
# ¿ May 5, 2011 04:14 |
|
Probably will need to use the Google Docs API. Shouldn't be too hard to write something in Python for it, and you can always expand the functionality of whatever you're using it for pretty easily.
|
# ¿ May 9, 2011 22:57 |
|
If you're feeling lazy use SWAT for Samba. Makes something already easy even easier.
|
# ¿ May 11, 2011 18:31 |
|
|
# ¿ Apr 19, 2024 02:01 |
|
I'm looking for some good reference books, mainly for shell scripting and general use. I read somewhere that Unix Power Tools is top-notch, but after looking around on amazon I saw Practical Guide to Linux Commands and seemed like what I'm looking for. I make extensive use of man pages, but sometimes I need something quick and dirty with good examples, something lacking from most man pages. I'm not just looking for general reference books, so if you know of an amazing book that's a little more specific to a particular topic I'd be interested to hear about it.
|
# ¿ May 15, 2011 00:59 |