Linux noob question:
If I have 500MB of RAM, and 500MB of swap space, can the OS and processes then use 1GB of memory?
In other words, is the total amount of memory available to programs and the OS the total of the physical memory size and swap size?
I'm trying to figure out which SNMP counters to query, but need to understand how L...
In *nix, how do I display (cat) a file with no line-wrapping: longer lines should be cut such that they fit into screen's width.
...
I've currently got:
ls -1 $(pwd)/*
Gives me all the files in a directory with absolute paths - but formats it with the directory at the start of each list of files.
Is there a way just to get a list of files in a directory recursively (absolute paths) - excluding the directory/sub-directories themselves?
...
I've got a list of directories that contain spaces.
I need to surround them with ' ' to ensure that my batch scripts will work.
How can one surround each new line with a ' and a ' (quotes).
e.g.
File1:
/home/user/some type of file with spaces
/home/user/another type of file with spaces
To
File2:
'/home/user/some type of file wit...
I've tried using:
win.configure(stack_mode=X.TopIf)
win.set_input_focus(X.RevertToParent, X.CurrentTime)
However even without any focus loss prevention on my window manager this does not work, does anyone know of another way to do this? Xlib or not.
...
File1:
hello world
foo bar
a word with a space
I need to replace all white spaces which are two or more in length with a semi-colon(;).
Result:
File2:
hello;world
foo;bar
a;word with a space
...
I'm looking for a bash function that will shorten long path names to keep my PS1 variable from getting excessively long. Something along the lines of:
/this/is/the/path/to/a/really/long/directory/i/would/like/shortened
might end up as:
/t../i../t../p../to/a/r../l../d../i/w../like/shortened
something that the took the path and a ma...
Hi folks,
I'm been using JMeter on a linux box, under the command line for a little bit. works fine.
Today, I tried it on a windows box (new client, etc) and it does work but the OUTPUT is waay different, in the console window.
The linux version dumps to the console a running commentary of what is going on -> Min/Max/Throughput/Error ...
#!/bin/bash
# Command line look up using Google's define feature - command line dictionary
echo "Type in your word:"
read word
/usr/bin/curl -s -A 'Mozilla/4.0' 'http://www.google.com/search?q=define%3A+'$word \
| html2text -ascii -nobs -style compact -width 500 | grep "*"
Dumps a whole series of definitions from google.com an examp...
Hi,
The error message I gen when I try to access the web page server "192.168.50.29/cgi-bin/tinyPL.cgi"; looks like this:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the ...
I am working on support projects from last 3 years on unix environments.
Where I didn't get much exposure to development work.
Though I got good experience to solving critical problems and debugging code for finding the defects but not much to develop.
I am performing good at work but sometimes I feel very low.
What my question to all gr...
I use the Fiddler proxy to debug all kinds of HTTP issues on Windows. It's great for inspecting headers and responses across multiple pages.
Is there a good HTTP debugging proxy for Mac and Linux? I found Charles, but it's $50 once the trial runs out and it crashed on me. I could use Wireshark, but it's a pain.
...
How can I search for 3 strings at a time in the vi editor?
I was wondering how could we do it. I.e. search for 3 strings at a time in vi
like I do: :/xyz in command mode.
How could I add 2 more strings so that the cursor will stop at a string which ever is found first among the three and if we press n it will stop at the string that i...
I've been trying to implement a bash script that reads from wordnet's online database and have been wondering if there is a way to remove a variety text files with one command.
Example FileDump:
**** Noun ****
(n)hello, hullo, hi, howdy, how-do-you-do (an expression of greeting) "every morning they exchanged polite hellos"
**** Verb **...
File1:
hello
- dictionary definitions:
hi
hello
hallo
greetings
salutations
no more hello for you
-
world
- dictionary definitions:
universe
everything
the globe
the biggest tree
planet
cess pool of organic life
-
I need to format this (for a huge list of words) into a term to definition format (one line per term). How can one achieve...
I need to merge two files with a Bash script.
File_1.txt
TEXT01 TEXT02 TEXT03 TEXT04
TEXT05 TEXT06 TEXT07 TEXT08
TEXT09 TEXT10 TEXT11 TEXT12
File_2.txt
1993.0
1994.0
1995.0
Result.txt
TEXT01 TEXT02 1993.0 TEXT03 TEXT04
TEXT05 TEXT06 1994.0 TEXT07 TEXT08
TEXT09 TEXT10 1995.0 TEXT11 TEXT12
File_2.txt need to be merged at this spe...
I have the following problem:
A program run on a windows machine (32bit, 3.1Gb memory, both VC++2008 and mingw compiled code) fails with a bad_alloc exception thrown (after allocating around 1.2Gb; the exception is thrown when trying to allocate a vector of 9 million doubles, i.e. around 75Mb) with plenty of RAM still available (at lea...
Hello all,
I am trying to compile simple PjSIP program under ubuntu. I am getting error as
/usr/bin/ld: cannot find -lpjsua-i686-pc-linux-gnu
Whats meaning of it ?
Here is the ouput
root@mypc-desktop:/home/mypc/pjsip# make
gcc -o myapp myapp.cpp -DPJ_AUTOCONF=1 -O2 -I/home/mypc/pjproject-1.4.5/pjlib/include -I/home/mypc/pjproject...
I have this executable that queries a remote server for a command, executes it on the local machine and returns the stdout (and also possibly stderr) from it back to the server.
This executable runs just fine if called from the command line (as root), but I found it's failing for some commands when executed automatically by the cron job...
I have a .NET Windows service that I would like to port to Mono on Linux.
What would be the proper way to install the service on Linux so that it works like a Windows service (i.e. autostart, runs when no users are logged in, etc)?
...