Here's a puzzler: can anyone explain why cd fails when the output is redirected to a pipe?
E.g.:
james@machine:~$ cd /tmp # fine, no problem
james@machine:~$ cd /tmp | grep 'foo' # doesn't work
james@machine:~$ cd /tmp | tee -a output.log # doesn't work
james@machine:~$ cd /tmp >out.log ...
Hello,
I am a little concern with the amount of resources that I can use in a shared machine. Is there any way to test if the administrator has a limt in the amount of resources that I can use?. And if does, to make a more complete question, how can I set up such limit?.
Thank you.
...
I want to pipe the output of grep as the search patter for another grep.
As an example:
grep <Search_term> <file1> | xargs grep <file2>
I want the output of the first grep as the search term for the second grep. The above command is treating the output of the first grep as the file name for the second grep. I tried using -e option fo...
Earlier today I asked a question about environ, and one of the more interesting replies suggested that I could gather information using LD_DEBUG.
Now I've known about some linker/loader environment variables (such as *LD_PRELOAD*) for awhile, but this one was new to me. Googling, I found a Linux-specific man page discussing environment ...
I asked this question:
http://stackoverflow.com/questions/434494/serial-port-rs232-in-mono-for-multiple-platforms
and this one is related:
http://stackoverflow.com/questions/304986/how-do-i-get-the-friendly-name-of-a-com-port-in-windows
But I want to be able to get the "friendly" name on Windows- and possibly also on linux /mac if ther...
How do I upgrade PHP 5.1 to 5.2 from the SUSE 10.1 command line? Is there a package manager command to do it automatically?
Actually I need JSON support to use the JavaScript-RTE and believe it's in PHP 5.2 only.
...
Today I had the problem that I couldn't delete a folder because "it was busy".
How can I find out which application to blame for that or can I just delete it with brute force?
...
I'm using APC to cache user variables (with the apc_store/apc_fetch commands). I've also enabled APC for the CLI with the option "apc.enable_cli = 1". However, the CLI version of PHP seems to access a different APC cache from the version used by Apache.
Is it possible to configure APC to use the same cache for both CLI and web invocati...
Background:
I have an application written in native C++ which uses the wxWidgets toolkit's wxODBC database access library which is being removed from all future versions of wxWidgets . I need to replace this with another database access method that supports the assumptions and contraints outlined below. I don't require that the replacem...
I have a computer (say computer A) whenever computer A gets a connection over a particular telnet port, it launches a program.
this program on computer A handles login, authentication etc. One of the jobs it can do is receive files. It handles this by launching gKermit.
/usr/local/bin/gkermit -e 8000 -w -a /location/x/ -ir
I have a s...
I'm trying to write a script that informs the user when someone has logged in on the machine via ssh.
My current idea is to parse the output of "w" using grep in intervals.
But that's neither elegant nor performant. Has anyone got a better idea how to implement such a program?
Any help would really be appreciated!
...
Trying to determine the Processor Queue Length (the number of processes that ready to run but currently aren't) on a linux machine. There is a WMI call in Windows for this metric, but not knowing much about linux I'm trying to mine /proc and 'top' for the information. Is there a way to determine the queue length for the cpu?
Edit to add...
I apologize profusely for the incredibly newbish question I'm about to ask, but for some reason, my brain's locked up:
I'm trying to code in C on gvim on a virtual machine running Ubuntu, but my Hello World throws compiler errors which I suspect has to do with the quotes being different ascii(unicode?) codes than standard quotes. It do...
In the program below, there are two things that I don't understand.
How can I use this makefile in Microsoft VC?
Why there is a '?' before '='?
Program:
ifeq ($(TARGET_COMPILER),ms)
include ../makefile.ms.config
DBG?= /Zi
OPT= /Ox
CXXFLAGS += $(COMMON_FLAGS) $(OPT) $(DBG)
EEXT = $(EXT).dll
ifeq ($(GZ...
As a Windows user, I found it difficult to master the
Linux and Vim commands.
So are there some cheat sheets to look them up into quickly?
...
In which cases, except development, would you prefer Xampp over a complete installation and configuration of Linux, Apache, MySQL, PHP.
...
I have a piece of usb hardware, for which I know the driver.
However, the vendor id and product id do not match the VID, PID pair registered in the driver. Is there a way in linux to force a driver to be associated with a known device, that do not involve kernel module recompilation to add a PID / VID pair ?
...
Long story short: in Linux, how do I ensure that an ACK message is received for a certain TCP packet?
Full story:
I'm debugging an Asterisk/OpenH323 <-> Panasonic IP-GW16 issue.
An H323 connection involves two sessions: H225.0 and H245. These are just two TCP sessions, over which some data are transmitted.
Let's call them Session 1 (...
Hi, I am writing a shell script to, among other things, determine the last time a branch was made in a subversion repository. The following code works:
DEV='http://some/svn/server/'
BRANCH='some/repos/branches/'
LAST_UPDATE=`svn list http://$DEV$BRANCH | sort -r`
LAST_UPDATE=${LAST_UPDATE:0:10}
But ...
One of the things I still can't wrap my head around is rules of thumb to uninstall programs in *nix environments. Most of the time I'm happy to let the sleeping dogs lie and not uninstall software that I no longer need. But from time to time I end up with several Apaches, svn, etc.
So far here's what I know about dealing with this:
1)...