|
admiraldennis posted:Is this what you want? In the spirit of teaching to fish as opposed to giving a fish, what exactly does the XB=${XA//./} line do?
|
# ? Dec 3, 2007 03:22 |
|
|
# ? May 10, 2024 20:44 |
|
GuyGizmo posted:In the spirit of teaching to fish as opposed to giving a fish, what exactly does the XB=${XA//./} line do? http://tldp.org/LDP/abs/html/string-manipulation.html ${var//./} returns var with every instance of '.' replaced with nothing. ( ${var/./} would only replace the first period).
|
# ? Dec 3, 2007 04:14 |
|
teapot posted:Where do you get any prompts when working with Asterisk? Asterisk runs as a server, its scripts run in its own interpreter, and its console is completely asynchronous. The only program with prompts I used with Asterisk is a voice messages generator script I wrote as a frontend to Festival. I don't mean prompts with in asterisk, but just command line prompts. For example: apt-get install -y gcc returns Please insert the Ubuntu CD Version Flippity Flop 6.08 Press [enter] to continue... Well, I don't have the Flippity Flop disk. But, it did infact download the package, but that's beside the point. It's waiting for me to push enter, but I don't have the disk. When I press enter, it just keeps asking over and over. I just need a way to quit the prompt and get back to a root shell or whatever the basic command prompt is.
|
# ? Dec 3, 2007 04:39 |
|
GuyGizmo posted:Why, yes it is. Thank you! No problem. What we're doing here is Bash string manipulation, specifically substring replacement. Spelled out, ${XA//./} is "replace all instances of '.' with '' in the variable $X1", the syntax being: ${str//substr/new} Replace all matches of $substr with $new in $str. ${str/substr/new} Replace first match of $substr with $new in $str. See the bash manual or the link that Scaevolus posted for (much) more information.
|
# ? Dec 3, 2007 04:41 |
|
Ericcorp posted:I don't mean prompts with in asterisk, but just command line prompts. For example: remove the CD ROM entries from /etc/apt/sources.list
|
# ? Dec 3, 2007 05:01 |
|
Ericcorp posted:I don't mean prompts with in asterisk, but just command line prompts. For example: Ctrl+C will usually terminate the process (unless it catches it, but this usually isn't the case.)
|
# ? Dec 3, 2007 05:18 |
|
Question. I was looking at VPS hosting and saw that 1and1.com uses fedora core 4 on their virtual servers. I don't know much about Fedora but I was under the impression Core 4 is dead? Does anyone actively make security patches for Core 4?
|
# ? Dec 3, 2007 20:50 |
Is there a way to get a directory listing to a text document (and add an http://www/path) so that I can easily use wget on another machine to grab every file on that list?
|
|
# ? Dec 4, 2007 19:59 |
|
fletcher posted:Is there a way to get a directory listing to a text document (and add an http://www/path) so that I can easily use wget on another machine to grab every file on that list? ls /path/to/dir | awk '{ print "http://www/path/" $1 }' > /path/to/file.txt * "ls" will give you a directory listing for the /path/to/dir directory. * "|" is called a pipe and it will send the standard output from the ls command and use it as the input to awk. * "awk" is a very handy tool for processes text, I am not an expert with it, but I know a couple of things. I would suggest you read an online tutorial for some basic awk examples to get a better understanding. * ">" will redirect the standard output from any program to a file, in this case we are redirecting the output from awk to /path/to/file.txt MillDaKill fucked around with this message at 20:40 on Dec 4, 2007 |
# ? Dec 4, 2007 20:16 |
Awesome, thanks! I appreciate the explanation of each command too, it really helps!
|
|
# ? Dec 4, 2007 23:23 |
|
Can anyone tell me how I can set up sshd to only allow people from my local network to access it, ie 192.168.2.xxx? I know I need to add some lines to the hosts.allow and hosts.deny, but I'm not sure how to add IP ranges.
|
# ? Dec 5, 2007 01:19 |
|
Casual Racist posted:Can anyone tell me how I can set up sshd to only allow people from my local network to access it, ie 192.168.2.xxx? I know I need to add some lines to the hosts.allow and hosts.deny, but I'm not sure how to add IP ranges. man 5 hosts_access
|
# ? Dec 5, 2007 01:26 |
|
MillDaKill posted:ls /path/to/dir | awk '{ print "http://www/path/" $1 }' > /path/to/file.txt
|
# ? Dec 5, 2007 01:29 |
|
Casual Racist posted:Can anyone tell me how I can set up sshd to only allow people from my local network to access it, ie 192.168.2.xxx? I know I need to add some lines to the hosts.allow and hosts.deny, but I'm not sure how to add IP ranges. this is really a job for iptables, not ssh
|
# ? Dec 5, 2007 01:36 |
|
fletcher posted:Awesome, thanks! I appreciate the explanation of each command too, it really helps! This is probably a better way to do it, the code I gave you before will also list the directories which you probably don't want. step 1 cd /dir/with/files step 2 find . -maxdepth 1 -type f | awk -F '/' '{ print "http://www/path/" $2 }' > /path/to/file.txt
|
# ? Dec 5, 2007 01:45 |
|
I'm having a really weird problem at work, probably NFS or NIS related. We're running Fedora Core 4 as user workstations and centos 3.8 on our servers. We're using VMWare on the workstations to run windows xp as well. Several times in the last months, the whole network came to a halt, and all computers slow down to a crawl. Its not predictable, I have no idea how to replicate it, and it usually goes away on its own after 10 minutes or so. The problem seems to be portmap, which is using 100% cpu time on most machines. Anybody have an idea what could be causing this ? I tried google and couldn't find anybody ever mentioning a problem like this.
|
# ? Dec 5, 2007 09:47 |
|
I guess, massive packet loss in overloaded network can cause something like that, however it also may be a result of server not responding because of hardware problems or too much disk I/O. Does it correspond to the time when daily or weekly cron jobs run? Can you try to record network traffic on the server at those times?
|
# ? Dec 5, 2007 10:14 |
|
teapot posted:I guess, massive packet loss in overloaded network can cause something like that, however it also may be a result of server not responding because of hardware problems or too much disk I/O. Does it correspond to the time when daily or weekly cron jobs run? Can you try to record network traffic on the server at those times? Hm, we have an nfs server thats a bit overloaded at times, that might be it. Why would portmap use 100% cpu then - if its not getting any response it keeps retrying constantly and uses 100% cpu ? Not nice ! I thought we had some configuration problem causing this, some misbehaving server doing weird broadcasts or something. If this is the expected result of a swamped nfs server or network I guess I know where to look. Or I can at least blame the hardware and its not my problem anymore. MonikaTSarn fucked around with this message at 10:31 on Dec 5, 2007 |
# ? Dec 5, 2007 10:26 |
|
MonikaTSarn posted:I'm having a really weird problem at work, probably NFS or NIS related. We're running Fedora Core 4 as user workstations and centos 3.8 on our servers. We're using VMWare on the workstations to run windows xp as well. Sorry I don't have any answers for you but I had a question about Fedora Core 4 that I asked a couple days in this thread with no answer... Can you get any security patches for the Fedora Core 4 packages still? I saw that Fedora Legacy went under and I know Fedora only supports each release for about a year.
|
# ? Dec 5, 2007 17:24 |
|
Sometimes I have phantom users logged in to my Linux box because their connection drops without the box realizing it (i.e. they're on wireless). How can I as an admin log them out and thus close their running programs?
|
# ? Dec 5, 2007 21:08 |
|
I've got a directory that is roughly 60 gB that I'd like to backup on DVDRs. In the end I'd like the discs to be easy to access (ie mount the disc and then be able to pull off a single file). Is there some program that will divide up the data into disc image size chunks (and preferably create the disc images as well)? Of course the packing of the files into the image need not be optimal in any way. The naive way of just adding files until no more fit and then starting on the next chunk would be more than sufficient.
|
# ? Dec 6, 2007 00:39 |
|
Evil Robot posted:Sometimes I have phantom users logged in to my Linux box because their connection drops without the box realizing it (i.e. they're on wireless). How can I as an admin log them out and thus close their running programs? To kill all all processes owned by a user, use: killall -u username Follow that with a killall -9 -u username to make sure they're all really dead.
|
# ? Dec 6, 2007 04:56 |
|
So I'm about 3 days into a fsck on a 500 gig drive with an ext3 filesystem. Is this normal? Should I be using a different file system maybe? Whats the best filesystem for an external drive?
|
# ? Dec 6, 2007 05:45 |
|
Harokey posted:So I'm about 3 days into a fsck on a 500 gig drive with an ext3 filesystem. Is this normal? Should I be using a different file system maybe? Whats the best filesystem for an external drive? 3 days tells me something's physically wrong with that disk. Check 'dmesg' output for errors.
|
# ? Dec 6, 2007 07:50 |
|
It takes far less time than that to fsck my 1.8TB array using ext3
|
# ? Dec 6, 2007 08:03 |
|
I am reading: man mkfs.ext3(8) on Ubuntu Linux It says: man mkfs.ext3(8) posted:-c Check the device for bad blocks before creating the file system. What is the advantage to a read-write test?
|
# ? Dec 6, 2007 08:15 |
|
Z-Bo posted:I am reading: man mkfs.ext3(8) on Ubuntu Linux Read-only test checks if recorded data is readable, so defects that affect the ability to write won't be detected. It's not uncommon for passive operation (reading) to succeed while active one (writing) fails. This is why it's possible for hard drives with few defects slowly appearing over the time to never lose data -- reading succeeds, write fails, drive's firmware relocates the sector, writes the same data at the new location completely transparently for the system (but it is recorded in SMART).
|
# ? Dec 6, 2007 10:37 |
|
Here's all that was in dmesg:code:
|
# ? Dec 6, 2007 17:03 |
|
6174 posted:I've got a directory that is roughly 60 gB that I'd like to backup on DVDRs. In the end I'd like the discs to be easy to access (ie mount the disc and then be able to pull off a single file). Is there some program that will divide up the data into disc image size chunks (and preferably create the disc images as well)? Of course the packing of the files into the image need not be optimal in any way. The naive way of just adding files until no more fit and then starting on the next chunk would be more than sufficient. To answer my own question, it appears that scdbackup is exactly what I was looking for. edit: After using this at work today, I can attest that it is a very good option for simple backups. 6174 fucked around with this message at 23:11 on Dec 6, 2007 |
# ? Dec 6, 2007 17:43 |
|
I just installed ubuntu last night and I've run into a snag using gnome-terminal to access a shell account: It keeps my last-entered text in the input line (in a weird way I might add) until I clear it with the down arrow. Here is my .screenrc from the shell account on silenceisdefeat.org. I think my buddy wrote it. code:
|
# ? Dec 7, 2007 19:03 |
|
MonikaTSarn posted:Hm, we have an nfs server thats a bit overloaded at times, that might be it. Why would portmap use 100% cpu then - if its not getting any response it keeps retrying constantly and uses 100% cpu ? Not nice ! Output from nfsstat will help you, high numbers under the retrans column indicate a saturated network. High levels of null calls are also bad. You can look this up on the clients or the server for extra information. You might want to strace the portmap process when its running away to see what its doing. I was going to suggest running a pstack against portmap but most linux binaries are stripped, therefore it wont give you useful information. However, portmap is not actually serving nfs, its just providing port lookups for people who want to use rpc services from that system. If (during the 100% cpu portmap time period) you tcpdump and watch for rpc packets - portmap listens on port 111 tcp/udp. You will be able to see what rpc requests are coming in from the network.
|
# ? Dec 7, 2007 21:51 |
|
Bucket Joneses posted:I just installed ubuntu last night and I've run into a snag using gnome-terminal to access a shell account: What happens if you comment out all termcapinfo lines before starting new screen session? What OS is running on your remote shell account? What is the output of code:
|
# ? Dec 7, 2007 21:51 |
|
teapot posted:Are you running screen session on the remote shell account? What happens if you don't, or if you exit one session and start another one while connected from this terminal? I am running it in screen and when I run irssi without screen the problem does not exist. quote:What happens if you comment out all termcapinfo lines before starting new screen session? I just did that and it seems to have fixed it. Thanks. Hello ubuntu! http://www.iamserio.us/files/loonix.png EDIT: now it's screwing up again. Dammit. DR FRASIER KRANG fucked around with this message at 23:26 on Dec 7, 2007 |
# ? Dec 7, 2007 22:47 |
|
So I actually have Internet included where I live. I was given a Linksys WUSB54GSC nub to connect to the Internet. It works fine in Windows, which is where I'm currently posting from. However, I also dual boot in Ubuntu 7.10 and cant' for the life of me get it to work. I've tried looking at ubuntuforums.org and even making a thread, but it just gets pushed down pages from everyone else having wireless problems. I tried this long ndiswrapper tutorial but when I run ndiswrapper -l it says invalid driver. I'm thinking of reformatting/restructuring my ext/ntfs partitions, so if someone's advice is to start with a reinstallation of Ubuntu from scratch, I wouldn't have a problem with it.
|
# ? Dec 8, 2007 20:48 |
|
I'm really not understanding permissions. I'm trying to make a folder (Docs) and all folders under it readable/writable/deletable by the user "blake," but the folder is owned by "data" - The user "data" also needs read/write access to the folder. Shouldn't I just be able to "chmod u+rwx Docs"?
|
# ? Dec 8, 2007 22:03 |
|
do it posted:I'm really not understanding permissions. I'm trying to make a folder (Docs) and all folders under it readable/writable/deletable by the user "blake," but the folder is owned by "data" - The user "data" also needs read/write access to the folder. Shouldn't I just be able to "chmod u+rwx Docs"? That helps the owner, but you have two users to worry about IIRC. You can create a new group that contains both users, change the group ownership recursively, and set existing folders to setgid (g+s) (this means new files will be owned by the shared secondary group instead of blake or data's primary group.
|
# ? Dec 8, 2007 22:09 |
|
The syslog on my server is filled with thousands of repeats of this:code:
|
# ? Dec 9, 2007 05:18 |
|
The Merkinman posted:So I actually have Internet included where I live. I was given a Linksys WUSB54GSC nub to connect to the Internet. It works fine in Windows, which is where I'm currently posting from. However, I also dual boot in Ubuntu 7.10 and cant' for the life of me get it to work. I've tried looking at ubuntuforums.org and even making a thread, but it just gets pushed down pages from everyone else having wireless problems. Why don't you just reinstall ndiswrapper, and this time give it the Windows driver for the USB wireless adapter like the countless howtos tell you to do? Or get a supported wireless adapter? Or post, what hardware do you actually have? Seriously, what the hell? I understand that "How to install a driver for Linksys WUSB54GSC wireless adapter?" it's a legitimate question, however the way you have expressed it sounds more like "I have installed Ubuntu, and it doesn't automatically detect a piece of hardware, even though I didn't even give it a driver disk -- this Linux thing is not working out for me, I want to post how much it sucks, and how I am going to not use it anymore!!!!111ONE!". Did you really expect Ubuntu forums to copy the answers into a separate thread to each and every person who did not bother searching for ndiswrapper installation instructions?
|
# ? Dec 9, 2007 05:30 |
|
MrBlandAverage posted:The syslog on my server is filled with thousands of repeats of this: Can be pretty much any kind of hardware failure. You can check if memtest will show any errors, however if it does, most likely it's motherboard and not memory problem. Your setup is pretty old, I wouldn't be surprised it has dried/exploded capacitors or is physically falling apart.
|
# ? Dec 9, 2007 05:37 |
|
|
# ? May 10, 2024 20:44 |
|
teapot posted:What is it with people and reinstalling the OS whenever they so anything wrong? teapot posted:Why don't you just reinstall ndiswrapper, and this time give it the Windows driver for the USB wireless adapter like the countless howtos tell you to do? I did, I tried drivers supplied in some howtos, drivers from Linksys' site, and drivers from the CD that came with the adapter teapot posted:Or get a supported wireless adapter? Because like I said, I didn't buy this adapter in the first place, and I'd like to see if I can get this one to work before buying another one. teapot posted:Or post, what hardware do you actually have? ASUS A8N-SLI Premium Mobo AMD Athlon 64+ 3200 1GB RAM 2 IDE HDs, 160GB Maxtor, 160 Seagate teapot posted:Seriously, what the hell? I understand that "How to install a driver for Linksys WUSB54GSC wireless adapter?" it's a legitimate question, however the way you have expressed it sounds more like "I have installed Ubuntu, and it doesn't automatically detect a piece of hardware, even though I didn't even give it a driver disk -- this Linux thing is not working out for me, I want to post how much it sucks, and how I am going to not use it anymore!!!!111ONE!". I don't know where all that aggression is coming from. I'm pretty sure I mentioned I did try some howtos, which, as you know would entail getting drivers. I also never went on some rant about how much Linux sucks or that I'm not going to use it anymore. If that were the case, I wouldn't bother asking for help to get the wireless to work.
|
# ? Dec 9, 2007 06:42 |