I've been looking for quite some time for an application that fills the same role as Logparser, an awesome piece of technology, but for Unix. Does anyone know of something this? (I've looked at Splunk but its an overkill, a simple command line is all I really need)
Note: Being able to make SQL queries on random logs, is great and much m...
Recently I was asked this during a job interview. I was honest and said I knew how a symbolic link behaves and how to create one, but do not understand the use of a hard link and how it differs from a symbolic one.
...
I have had to do this several times, usually when trying to find in what files a variable or a function is used.
I remember using xargs with grep in the past to do this, but I am wondering if there are any easier ways.
...
I many times have to work with directories containing hundreds of thousands of files, doing text matching, replacing and so on. If I go the standard route of, say
grep foo *
I get the too many files error message, so I end up doing
for i in *; do grep foo $i; done
or
find ../path/ | xargs -I{} grep foo "{}"
But these are less th...
Will users who do not have admin rights on their computers be able to upgrade to new Flash player version by themselves?
This would be interesting to know for:
Windows 98
Windows XP/2000/Vista
Macs
Unix/Linux
...
I am aware of how to setup autocompletion of python objects in the python interpreter (on unix).
Google shows many hits for explanations on how to do this.
Unfortunately, there are so many references to that it is difficult to find what I need to do, which is slightly different.
I need to know how to enable, tab/auto completion of ...
I often use the execv() function in C++ but if some of the arguments are in C++ strings. It annoys me that I cannot do this:
const char *args[4];
args[0] = "/usr/bin/whatever";
args[1] = filename.c_str();
args[2] = someparameter.c_str();
args[3] = 0;
execv(args[0], args);
This doesn't compile because execv() takes char *const argv[]...
In deploying to a new (Solaris 9) environment recently, one of the steps was to copy a set of files and directories to their new location and then to apply the group UID bit (using "chmod -R g+s") to all files in the directory tree giving a mode of -rwxr-s--- to everything. The result was that none of our shell scripts would execute unle...
Trying to debug an issue with a server and my only log file is a 20GB log file (with no timestamps even! Why do people use System.out.println() as logging? In production?!)
Using grep, I've found an area of the file that I'd like to take a look at, line 347340107.
Other than doing something like
head -<$LINENUM + 10> filename | tail -...
What is the basic differences between Semaphores & Spinlock? & In what best situations or conditions, we can use these.
...
Can anyone point to some code that deals with the security of files access via a path specified (in part) by an environment variable, specifically for Unix and its variants, but Windows solutions are also of interest?
This is a big long question - I'm not sure how well it fits the SO paradigm.
Consider this scenario:
Background:
Sof...
I can write a trivial script to do this but in my ongoing quest to get more familliar with unix I'd like to learn efficient methods using built in commands instead.
I need to deal with very large files that have a variable number of header lines. the last header line consists of the text 'LastHeaderLine'. I wish to output everything aft...
My old shell host (StrayNet) is closing up, and I'd like to find a decent, relatively cheap Unix shell host that offers:
a couple of background processes
email, irc, etc.,
an IP address or vhost.
For the record, I do have a Slicehost slice, so I'm not looking for anything to host a project. I just like having a third location to pin...
I would like to know exactly how the "Is" command works in Linux and Unix.
As far as I know, ls forks & exec to the linux/unix shell and then gets the output (of the current file tree. eg./home/ankit/). I need a more detailed explanation, as I am not sure about what happens after calling fork.
Could any one please explain the function...
On Unix, is there any way that one process can change another's environment variables (assuming they're all being run by the same user)? A general solution would be best, but if not, what about the specific case where one is a child of the other?
Edit: How about via gdb?
...
Real UID, effective UID, and some systems even have a "saved UID". What's the purpose of all these, especially the last one?
...
Is there a quick tcpdump one-liner to print out a TCP stream that matches a particular substring -- or, if that's not easy, how about printing out just the single TCP packet that matches the substring?
...
we can use time in a unix environment to see how long something took...
shell> time some_random_command
real 0m0.709s
user 0m0.008s
sys 0m0.012s
is there an equivalent for recording memory usage of the process(es)?
in particular i'm interested in peak allocation.
...
Hi,
How do I get the full width result for the *nix command "ps"?
I know we can specify something like "--cols 1000" but is there anyway I can
the columns and just print out everything?
...
We have an application on Linux that used the syslog mechanism. After a week spent trying to figure out why this application was running slower than expected, we discovered that if we eliminated syslog, and just wrote directly to a log file, performance improved dramatically.
I understand why syslog is slower than direct file writes. ...