|
Is there a command that will give you x bytes from a file starting at offset n?
|
# ? Apr 29, 2012 03:45 |
|
|
# ? Jun 3, 2024 11:22 |
|
Bob Morales posted:Is there a command that will give you x bytes from a file starting at offset n? dd
|
# ? Apr 29, 2012 03:49 |
|
Bob Morales posted:Is there a command that will give you x bytes from a file starting at offset n?
|
# ? Apr 29, 2012 03:51 |
|
Alright I've had it. I again spent too much time trying to get Evernote for Windows running in wine, but it just won't login to evernote.com on the very first screen. It says that the servers cannot be reached, but testing with IE from the same prefix tells me there is internet connectivity available. However, wine's IE is crashing when switching from HTTP to HTTPS, which tells me there is something wrong with wine's SSL implementation. I've come up with the following hack idea:
This should circumvent the whole ugly SSL mess on "Evernote for Windows"'s side, right? vvvvvv I have, and even sent a report to the app maintainer days ago but haven't heard anything back yet. kyuss fucked around with this message at 22:05 on Apr 29, 2012 |
# ? Apr 29, 2012 09:46 |
|
kyuss posted:Alright I've had it. Have you checked the app db on winehq? http://appdb.winehq.org/objectManager.php?sClass=version&iId=24253
|
# ? Apr 29, 2012 15:47 |
|
I've got some sed questions: How does $ represent the end of a line and the last line? What distinction is there to make it represent one or the other? (e.g., sed '$d' filename.ext and sed 's/^$//g' filename.ext) I know you can refer to a tab with \t, but are there any other things that are represented by a backslash and a character? Also, and this doesn't have to be done using sed, but is there a way to (preferably using a one liner) replace a specified instance of a string within a file (as opposed to a line)? For example, the first instance of a string within a file or the fiftieth instance within the file.
|
# ? Apr 30, 2012 16:15 |
|
Our web server is having a case of the Mondays:code:
|
# ? Apr 30, 2012 16:25 |
|
Well if you have 42 6-core Xeons in that box then you're doing just fine Otherwise
|
# ? Apr 30, 2012 17:19 |
|
Martytoof posted:Well if you have 42 6-core Xeons in that box then you're doing just fine 8 vCPU's, so basically a single quad-core Xeon 5520 (2.25GHz or something, it's fairly old) The bad thing was that we ran out of RAM and once we start paging we're dead. We had it setup where each web app could launch x amount of instances, and we added two more sites over the weekend and didn't change the configuration at all. We had it setup so it would run right up close to the limit of physical RAM, I thought that the global max_instances would have stopped it but.... Then you have 20,000 new users sign up on a Monday and ka-pow.
|
# ? Apr 30, 2012 17:28 |
|
All of these questions can be answered with with sed manual, accessible with info sed (man sed is a quick reference for people already familiar with sed). I've provided manual references so you can go look up the details yourself if you wish.Crush posted:I've got some sed questions: '$' as an address matches the last line of input. '$' as a character in a regular expression matches the end of the pattern space. Note that if the regular expression has the M flag, '$' instead becomes 'matches just before any linebreak' in addition to matching the end (and '^' becomes 'matches just after'). (3.2 "Selecting Lines", 3.3 "Overview of Regular Expressions") quote:I know you can refer to a tab with \t, but are there any other things that are represented by a backslash and a character? 3.9 "GNU Extensions for Escapes" has a complete list; the short form is that it has the C escapes afnrtv, cX for ctrl-X, odx for octal, decimal, or hex character codes, and some regex-specific escapes bBwW`'. quote:Also, and this doesn't have to be done using sed, but is there a way to (preferably using a one liner) replace a specified instance of a string within a file (as opposed to a line)? For example, the first instance of a string within a file or the fiftieth instance within the file. A sed guru can probably come up with a better way of doing this, but here's mine: sed -n '1{h;d}; H; ${g; s/FIND/REPLACE/50; p}' You can pipe the file through this, or use -i and pass it on the command line as you like. To break this down: code:
|
# ? Apr 30, 2012 18:45 |
|
.
maskenfreiheit fucked around with this message at 21:04 on Apr 28, 2019 |
# ? Apr 30, 2012 20:36 |
|
GregNorc posted:So I am trying to burn some MP3 cds, but get this error when opening K3b on my Redhat 6.2 install: Can you use the Fedora instructions? http://www.fedorafaq.org/#mp3 quote:Q: How do I play MP3s in Fedora?
|
# ? Apr 30, 2012 20:44 |
|
GregNorc posted:So I am trying to burn some MP3 cds, but get this error when opening K3b on my Redhat 6.2 install: Yeah I think you can use libmad for that, which is in RPMForge. Install this rpm (or this if you're on 32 bit.) And then yum install libmad.
|
# ? Apr 30, 2012 20:46 |
|
GregNorc posted:So I am trying to burn some MP3 cds, but get this error when opening K3b on my Redhat 6.2 install: In debian k3b is split up so the nonfree codecs are in a different package which is separate from the main program, libk3b6-extracodecs. There might be something similar going on in redhat.
|
# ? Apr 30, 2012 20:48 |
|
.
maskenfreiheit fucked around with this message at 21:04 on Apr 28, 2019 |
# ? Apr 30, 2012 21:08 |
|
GregNorc posted:Tried this, it might work... but since it's a uni owned computer, I cannot su, but merely sudo. Sent an email to hour helpdesk, so I will probably be back here sometime next week if the command did not work :/ Well sudo is good enough if you can do everything. Just put sudo in front of all the commands. You're probably not allowed to do that though. (And if your only reason for asking is: I want to burn some MP3's to a CD then well...)
|
# ? Apr 30, 2012 21:23 |
|
general question, I'm teaching myself how to use Linux and trying to read through this: http://tldp.org/LDP/intro-linux/html/. Are there any other good resources out there if I want to move beyond a basic understanding of the system?
|
# ? May 1, 2012 18:08 |
|
The Third Man posted:general question, I'm teaching myself how to use Linux and trying to read through this: http://tldp.org/LDP/intro-linux/html/. Are there any other good resources out there if I want to move beyond a basic understanding of the system? this is very worth it http://www.amazon.com/RHCSA-Linux-Certification-Study-Edition/dp/0071765654
|
# ? May 2, 2012 04:06 |
|
I just installed Fedora 16 (last night) and I want to try out KDE. I installed from the x86_64 ISO which game with Gnome 3 by default. I've not made any big changes to the system (I think) but when I try to run "sudo yum install @kde-desktop" it fails with this error: http://pastebin.com/TRYV3Gur This is a weird error and I'm kind of new to Linux -- has anyone seen this before or had any suggestions? It seems weird that it would flat out just not work, or am I missing something?
|
# ? May 2, 2012 04:09 |
|
Clugg posted:I just installed Fedora 16 (last night) and I want to try out KDE. I installed from the x86_64 ISO which game with Gnome 3 by default. It looks like you added the updates-testing repo and the kde packages aren't built with that in mind. It'll probably work if you use the skip-broken switch like it suggests but did you enable the updates-testing repo yourself?
|
# ? May 2, 2012 04:12 |
|
Longinus00 posted:It looks like you added the updates-testing repo and the kde packages aren't built with that in mind. It'll probably work if you use the skip-broken switch like it suggests but did you enable the updates-testing repo yourself? Using the skip-broken switch allowed me to continue, but KDE didn't install properly -- I can't select it at logon or change by the command line. I can't remember enabling the updates-testing repo, I might have ticked the box during installation. Seems like that might be the problem -- would it be tricky to fix? e: that repo appears to be disabled at the moment, but presumably has been enabled at some point in the past. I guess it would just be a matter of removing the four packages there and installing kde again? Clugg fucked around with this message at 07:05 on May 2, 2012 |
# ? May 2, 2012 06:59 |
|
Clugg posted:Using the skip-broken switch allowed me to continue, but KDE didn't install properly -- I can't select it at logon or change by the command line. I'm not a yum guru but yes, in principle you'd reinstall all the packages from the testing repo with versions from your normal repos.
|
# ? May 2, 2012 07:30 |
|
The Third Man posted:general question, I'm teaching myself how to use Linux and trying to read through this: http://tldp.org/LDP/intro-linux/html/. Are there any other good resources out there if I want to move beyond a basic understanding of the system? Everyone at my work place recommended this book: http://www.amazon.com/Linux-System-Administration-Handbook-Edition/dp/0131480057/ref=sr_1_3?s=books&ie=UTF8&qid=1335941376&sr=1-3 I just purchased it so I haven't had time to dig in.
|
# ? May 2, 2012 07:51 |
|
Clugg posted:Using the skip-broken switch allowed me to continue, but KDE didn't install properly -- I can't select it at logon or change by the command line. You could install the proper kde build: http://fedoraproject.org/en/get-fedora-options#desktops
|
# ? May 2, 2012 16:34 |
|
I have my own question! Is there a proper way to set a /sys parameter on boot? Google is telling me to put it in /etc/rc.local, but that is not a file I have in Fedora 17. I am not sure if that is because Fedora is doing something different, or if I should just create it?
|
# ? May 2, 2012 19:12 |
|
Those go in /etc/sysctl.conf.
|
# ? May 2, 2012 19:49 |
|
Kaluza-Klein posted:I have my own question! Is there a proper way to set a /sys parameter on boot? Google is telling me to put it in /etc/rc.local, but that is not a file I have in Fedora 17. I am not sure if that is because Fedora is doing something different, or if I should just create it? http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/3/html/Reference_Guide/s1-proc-sysctl.html
|
# ? May 2, 2012 19:54 |
|
Bob Morales posted:http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/3/html/Reference_Guide/s1-proc-sysctl.html Right, I had tried to use that, but couldn't get it to work. The parameter I am trying to modify is /sys/module/hid_apple/parameters/fnmode. sysctl assumes /proc/sys, which doesn't seem to be the same thing? sysctl -a | grep hid doesn't show hid_apple.
|
# ? May 2, 2012 20:48 |
|
Kaluza-Klein posted:Right, I had tried to use that, but couldn't get it to work. It's a vfs which can be mounted either under / or /proc. Try putting this in sysctl.conf (last line) module/hid/parameters/pb_fnmode = 2
|
# ? May 2, 2012 20:51 |
|
/proc/sys and /sys are completely different things, and you can't use /etc/sysctl.conf to change stuff in /sys. That said, you probably shouldn't be using the /sys interface to change a module parameter. Just make a file in /etc/modprobe.d with: code:
|
# ? May 2, 2012 20:58 |
|
spankmeister posted:It's a vfs which can be mounted either under / or /proc. I don't have a /sys/module/hid/parameters/pb_fnmode or a /proc/sys/module/hid/parameters/pb_fnmode I have both a /proc/sys and a /sys, which do not have the same contents. edit: Ah ShoulderDaemon, that makes sense! We'll see what happens next time this thing had to reboot. So /sys contains module parameters and /proc contains kernel parameters? other people fucked around with this message at 21:04 on May 2, 2012 |
# ? May 2, 2012 21:01 |
|
Kaluza-Klein posted:So /sys contains module parameters and /proc contains kernel parameters? /sys and /proc/sys contain the same sort of information, namely kernel configuration information. The /sys hierarchy was introduced because there was a need to store an extremely dynamic configuration, namely the device configuration, which the /proc/sys interface in the kernel was very ill-suited for. Module configuration wound up in /sys for a similar reason; because modules can appear and vanish at runtime, it's irritating to make room for them in the /proc/sys interface. So nowadays you get device-specific and module-specific stuff in /sys, and general tuning parameters in /proc/sys. There are a few warts, like some parts of the network configuration appearing in both places for various silly historical reasons.
|
# ? May 2, 2012 21:12 |
|
ShoulderDaemon posted:/proc/sys and /sys are completely different things, and you can't use /etc/sysctl.conf to change stuff in /sys. I must be on crack. Thanks
|
# ? May 2, 2012 21:29 |
|
I remember reading somewhere (possibly on some part of lwn.net) that the kernel developers consider /proc to be an uncontrolled mess that outgrew its original purpose long ago. They decided to start from scratch with a well-designed hierarchy in /sys -- as far as I know /proc is semi-deprecated for anything that isn't "information on running processes". Problem is, /proc's layout is hardcoded in a ton of userspace tools and not all of its functionality has been ported to /sys. For example, I don't know of any way to read/write the equivalent of /proc/sys/net/ipv4/ip_forward in the /sys filesystem.
|
# ? May 2, 2012 21:32 |
|
Clugg posted:Using the skip-broken switch allowed me to continue, but KDE didn't install properly -- I can't select it at logon or change by the command line.
|
# ? May 3, 2012 01:55 |
|
Social Animal posted:Everyone at my work place recommended this book: http://www.amazon.com/Linux-System-Administration-Handbook-Edition/dp/0131480057/ref=sr_1_3?s=books&ie=UTF8&qid=1335941376&sr=1-3 Awesome. I was thinking about purchasing a *nix book for career enhancing study and this seems to fit the bill perfectly. Ran out on my lunch and picked up a copy! I'll most likely get the RH book as well since I'll be going for those certifications after I complete the CCNA.
|
# ? May 3, 2012 05:06 |
|
joe944 posted:Awesome. I was thinking about purchasing a *nix book for career enhancing study and this seems to fit the bill perfectly. Ran out on my lunch and picked up a copy! If you don't already have one you should really look into getting a Safari Books Online account so you can get a bunch of books for cheap in order to study for certs. https://safaribooksonline.com
|
# ? May 3, 2012 16:19 |
|
Lysidas posted:They decided to start from scratch with a well-designed hierarchy in /sys -- as far as I know /proc is semi-deprecated for anything that isn't "information on running processes". /proc is much more free form. There's also debugfs (not to be confused with the user-space ext file system manipulation tool of the same name) that's intended for free-form user-space interaction with modules.
|
# ? May 3, 2012 17:45 |
|
Yo openSUSE what's up with your poo poo? I have never had as many segfaults, weird system things, or whatever, as I have on a standard 12.1 install. Try to set the system time by right clicking the clock in the bottom task bar? Hit apply -- Oops KDE segfault notification window. Try to add some packages through YAST? Oops packaged is locking the system and hasn't released it for hours. There are a hundred other little notifications that pop up about something not running or indexing being disabled or whatever. Try to run a system update? Half the downloads stall. (Okay, this one is actually just a problem with the closest mirror, probably, but it's part and parcel of the whole frustrating experience I've had today. I don't know if this is just KDE being poo poo or what, but openSUSE is seriously lacking in polish. If I wasn't asked for this specific setup I would have just installed CentOS Desktop or something
|
# ? May 3, 2012 20:24 |
|
|
# ? Jun 3, 2024 11:22 |
|
Martytoof posted:Yo openSUSE what's up with your poo poo? I thought openSUSE wasn't going to be support anymore and left to die?
|
# ? May 3, 2012 23:32 |