linux

what is /bin/true

All, In linux what is /bin/true Thanks..... ...

Webapp update shell script

I feel silly asking this... I am not an expert on shell scripting, but I am finally in enough of a sysadmin role that I want to do this correctly. I have a production server that hosts a webapp. Here is my routine. 1 - ssh to server 2 - cd django_src/django_apps/team_proj 3 - svn update 4 - sudo /etc/init.d/apache2 restart 5 - logout ...

Are there some program like COM2COM in linux?

I use com0com for program testing in windows, are there any program like com2com in linux? I know there is pts/ptmx, but what I want is a stand alone program to provide 2 virtual serial ports... Then I can open 2 program, each attench one... ...

searching for files from a single folder (knowing prefix) versus searching for files from multiple folders (knowing folder name)

Hi! I've got a system in which users select a couple of options and receive an image based on those options. I'm trying to combine multiple generated images(corresponding to those options) into the requested picture. I'm trying to optimize this so that if, an image exists for a certain option (i.e. the file exists), then there's no need...

What do you think of a language dedicated to Linux admin and pen testing?

Hi all, I've recently started developing a new scripting language. It uses a single interpreter and so far works pretty well. It's a mixture of C, C#, Ruby, Python, Perl and even some PHP. Normally I wouldn't have bothered with such an idea, but to make pen testing and linux administration easier I just had to. All of the above language...

How can i grep a nearer word from a file ?

How can i grep a nearer word from a file ? E.g 04-02-2010 Workingday 05-02-2010 Workingday 06-02-2010 Workingday 07-02-2010 Holiday 08-02-2010 Workingday 09-02-2010 Workingday I stored above data in a file 'feb2010', By this commend i stored date in one variable date=date '+%d-%m-%Y' if date is 06-02-2010 , i want to grep " 0...

Is it possible to run a batch script remotely on a Windows machine from Linux without installing ssh?

I am looking for a way in Linux to run a batch script on a remote Windows machine. I already searched some forums and the Internet and found e.g. this question. It seems that the easiest way so far is using ssh. But do Linux or Windows also offer some built-in tools to solve this problem (something like at-command for Linux-to-Windows)...

Is a return value of 0 from write(2) in C an error?

In the man page for the system call write(2) - ssize_t write(int fd, const void *buf, size_t count); it says the following: Return Value On success, the number of bytes written are returned (zero indicates nothing was written). On error, -1 is returned, and errno is set appropriately. If count is zero and the file ...

clientaccesspolicy.xml and subdomain

my site has a subdomain, I use this policy with my silverlight app, <?xml version="1.0" encoding="utf-8" ?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="http://dev.system-engine.com"/&gt; </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </gr...

How do the Linux kernel swap the file mapped page?

I use file mapping to read a 20 GB file. And when the main memory is exhausted, how is the kernel swapping the file mapped pages to the disk? A possible way I guess is to set the page entry to NULL. Then next time if the page is accessed, the do_no_page() function will be called again to map the file to memory. Is it right? Another qu...

How much of an iPhone app can be developed and tested on Linux?

I develop some iPhone apps for clients, but I prefer working on a Linux machine. I know that there are certain things you need to do on a machine running OS X, like build the final distribution, run the iPhone app in the simulator, etc. But I was wonder how much of say, the model layer, of an iPhone app you could build and test on a Lin...

solaris elfedit: Is there something similar for linux ? (a shared library editor)?

Linux: It there a way to edit a compiled shared library ? specifically I am searching on how to add the DT_SYMBOLIC flag on an already compiled binary shared library? Here is why I am asking this: our application is composed of our own libraries (static libXXX.a) some 3rd party libs (binary-only shared libraries libYYY.so) Every...

Postgres pg_dump dumps database in a different order every time

Hello, I am writing a PHP script (which also uses linux bash commands) which will run through test cases by doing the following: I am using a PostgreSQL database (8.4.2)... 1.) Create a DB 2.) Modify the DB 3.) Store a database dump of the DB (pg_dump) 4.) Do regression testing by doing steps 1.) and 2.), and then take another databa...

Application path and listening port

I'd like to know which application that is listening on a port on a linux machine. There are multiple servers, apache and what not on a single machine and I'd like to know which server is listening on which port without having to dig through the configuration files of each server. Is there a command that lists the path to the executab...

Are passwords on modern Unix/Linux systems still limited to 8 characters?

Years ago it used to be the case that Unix passwords were limited to 8 characters, or that if you made the password longer than 8 characters the extra wouldn't make any difference. Is that still the case on most modern Unix/Linux systems? If so, around when did longer passwords become possible on most systems? Is there an easy way to ...

What languages and frameworks should a freelance developer learn?

I already know all about Linux. I would like to start developing part-time, and be able to fall back on it full time if need be. I am a techie looking make money quickly with the least hassle, doing something vaguely related to my hobbies. I've been thinking about Python because it's beautiful, useful, and I will come closer to learning...

malloc behaves differently on different machines

Hi, I see totally different behavior when running a piece of program that tries to exceed RSS on different machines. The code is something like: ... char** s = (char**)malloc(10000*sizeof(char*)); for (i = 0; i < 10000; i++){ s[i] = (char*)malloc(1000*1000*sizeof(char)); if (s[i] == NULL) { printf("cannot allocate me...

Best way for PHP5 CLI to formulate Base Directory?

Ok say I have a code base that is contained in a folder /myProgram/ and has various folders such as /myProgram/lib/, /myProgram/docs/ and so on... How, in PHP, can I go about detecting any folders before /myProgram/ and creating a base variable so my includes and require's can be written relative to the base directory /myProgram/ allowi...

Open source "push" messaging

I'm looking for something open source that can "push" messages to connected clients based on their subscription, for example "User 1" might be subscribed to "feed1" and "feed3" and "User 2" might be subscribed to "feed2" and "feed3" etc. I've got something working using ejabberd but it requires that the server send a message individual...

Simple way to convert 00:20:40.28 (hours:minutes:seconds.split seconds) to seconds

Whats an easy way to convert 00:20:40.28 to seconds with a bash script? (Split seconds can be cut out, it’s not essential.) ...