Reputation
22,237
Next tag badge:
332/400 score
95/80 answers
Badges
2 28 79
Newest
 Yearling
Impact
~1.9m people reached

  • 0 posts edited
  • 6 helpful flags
  • 2,036 votes cast
Aug
18
comment Wireless connected but no connection
How old is the laptop (?) you're using? Does this happen if you plug in a new(ish) USB writeless card? I'm told that the low-noise amplifiers on wireless cards can degrade with time.
Aug
18
comment Can't find connected devices on wifi network
Give us some help, here. Show the output of "ifconfig wlp12s0" or whatever your wireless device is, or the output of "ip link". Show us the nmap command line. Show us the output of ip route. Tell us what brand of wireless router you've got going, and what it's running (DD-wrt, OpenWrt, what?), and what it says are the connected devices. You're not telling us enough to help at all.
Aug
14
comment How to get new ip using dhcpcd
You do know that it's possible for the DHCP server to always give the same IP address to a given hardware (MAC, ethernet) address, right? I have my home network's dhcpd configured to give a printer the same IP address every time. No amount of fiddling with dhcpcd will change that, you'd have to change the interface's MAC address.
Jul
30
comment routing problem - arp
Add some information to your question. Do ifconfig tun3 and ifconfig virbr1 and put that on your question. As your question stands, there's no way to answer it.
Jul
30
comment Is the return value “-1” of the function socket close() method possible?
If the code I write is explicitly single-threaded, are there "background" threads (for lack of a better word) that execute without my code starting them? That is, in a program that never calls pthread_create(), should I think about the EINTR situation with respect to closing a file descriptor?
Jul
28
comment Why signal function is not able to call my signal Handler?
@Kalu - if you had your child process doing a getppid() system call, you might catch PID 1 as the parent PID, if the forking process exits fast enough, and the kernel's scheduler cooperates.
Jul
28
comment Why signal function is not able to call my signal Handler?
You could also use the pause() system call instead of sleep(), to allow time to do a few ps -ef and check PID -> PPID relationships without hurry.
Jul
22
comment Bash script strange behavior - script does not act as manual commands
This looks like you've got some difference in environmental variables or their values between your login shell, and the /bin/bash that runs the script. Can you run printenv in a script and see if that matches printenv output from the interactive (login) shell?
Jul
21
comment r8168 connection drops randomly
this seems like a hardware problem of some sort, either with the cable or the ethernet interface itself. It's not unheard of for on-board ethernet interfaces to fail. You might have to get a USB ethernet interface and use that instead.
Jul
10
comment r8168 connection drops randomly
now I have a new theory. Check the IP address of the ethernet interface while it works. After it quits working, check again. Maybe dhclient or dhcpcd is giving up on the lease or getting a bad lease or something. You should also try ethtool and/or mii-tool while it works, and after it quits working. Some difference in output might clue you in.
Jul
9
comment How to kill a task that cannot be killed (uninterruptable?)
How about adding the output of ps -l -p 31207 to see what the "WCHAN" column holds. Beyond that, the question you reference has the answer: if you can't kill a process, it's waiting on network filesystem, there;s a kernel bug, or there's a hardware problem.
Jul
7
comment r8168 connection drops randomly
This is odd, but it seems to me that you might have a bad cable, a cable with an intermittent short or something. Can you try this with another cable?
Jun
29
comment How can I count the number of whitespace characters in a file?
@Alison - your method might seem indirect, but I don't think that's the case. No matter how you do this task, you have to have a program that examines every character (every byte) in the file. There's no short cuts for that I can see. "Deleting" isn't really the case, as tr actually just passes all whitespace characters down the pipe. It's just selective about what characters it passes, rather than "deleting" anything.
Jun
25
comment Can tarring files improve compression?
The "random" file contents are a problem. They're incompressible. Use two different large text files to get a better idea. A related idea here is "normalized compression difference". You might take a look at ims.cuhk.edu.hk/~cis/2005.4/01.pdf to see what kind of problems you can encounter doing this kind of testing.
Jun
25
comment Comparing Oracle version in bash script
@triplus - Glad I could help. The custom is to upvote good answers, and mark the best or correct answer.
Jun
23
comment Wifi cuts out after some time
In addition to the Wi-fi chipsets of both laptop and router, you should mention the age of both laptop and router. I've read people speculating that "low noise amplifiers" wear out when they age. I've certainly experienced the symptoms you describe, but all of my gear is either used to hand-me-downs, so I never experienced it new.
Jun
22
comment Extract just the hostname and port number from tnsnames.ora file
There may not be a good way to reliably get the Service Identifier without a full parse of the descriptions. I don't see a good way to shortcut a grammar-based solution. The only reason my awk-based solution to finding the "HOST" value works is that I could make name/value pairs out of the descriptions.
Jun
22
comment Kernel driver for wireless adapter not in use
@TheDerkus - I've never set up or used a dual boot machine, and I only use Windows at work. I would guess that you could mount the Windows disk when you've booted from a USB drive, but I don't know for sure. That's really another question.
Jun
20
comment How can I shorten strings shown in the i3status bar?
@pleasedeleteme - I think you're out of luck. If you read the i3status man page, the author(s) explicitly write that they didn't want to reimplement job control, so there's no way to do what you ask. Sorry.
Jun
18
comment Why does the terminal echo keystrokes when commands are running?
Since the rest of the TTY system seems like a good design, I'm guessing this feature is there on purpose, and that purpose is to allow type-ahead. PDP-11s probably took a lot of time waiting for disk or tape input, so type-ahead would have been a real benefit.