I have some applications, and standard Unix tools sending their output to named-pipes in Solaris, however named pipes can only be read from the local storage (on Solaris), so I can't access them from over the network or place the pipes on an NFS storage for networked access to their output.
Which got me wondering if there was an analogo...
In Unix all disks are exposed as paths in the main filesystem, so os.walk('/') would traverse, for example, /media/cdrom as well as the primary hard disk, and that is undesirable for some applications.
How do I get an os.walk that stays on a single device?
Related:
Is there a way to determine if a subdirectory is in the same filesyst...
I had the impression sed wasn't blocking, because when I do say:
iostat | sed
sed processes the data as it arrives, but when I do
iostat | sed | netcat
Then sed blocks netcat.
Am I right?
...
I been looking into Cygwin/Mingw/lcc and I liked to be able to compile perl native C extensions on my windows(preferably under cygwin) and then run them on Solaris and HP unix without any further fuss, is this possible?
This all stems from my original perl cross-platform question here.
...
Hi,
I have a few Solaris 10 boxes and I'd like to have RDiscount running there. (They are Joyent accelerators, which have a somewhat customized, BSD-ish, userland, in case it matters.)
I'm aware of Maruku, rpeg-markdown and other ruby alternatives to BlueCloth, but initially I'd like to go with RDiscount.
Here's what I get when trying...
I'm looking for some videos about the history of Unix/Linux and Open Source Software. I know (and have) Revolution OS.
Are there any others?
Edit: I'm a teacher and need resources to show students.
Edit: I found Revolution OS on Google Video.
...
I am trying to check for files which are larger than a given threshold. I know that the 'du' comand gives me the output for each file/folder, but how to put that in a single line on shell (using awk with if clause?).
...
Let's say I have two directory structures:
/var/www/site1.prod
/var/www/site1.test
I want to use find(1) to see the files that are newer in /var/www/site1.test than their counterparts in /var/www/site1.prod.
Can I do this with find(1), and if so, how?
...
I have a bunch of tar files in a directory and I want to extract all the files from them at once. But this doesn't seem to do anything:
$ tar xf *.tar
What's going on here? How do I untar a bunch of files at once?
...
I'm sure there's some ancient legacy reason for it, but what is it? It seems like a service that's geared towards reliable data delivery.
...
The definition of the UNIX open() function when used with the O_CREAT flag is that it requires a third argument named mode in order to set the files' privileges.
What if that mode is not specified?
int file;
static const char filename[] = "test.test";
if ((file = open(filename, O_RDWR | O_CREAT | O_TRUNC)) == 1)
{
perror("Error o...
Hi all,
I have sed related question:
If I run these command from a scrip:
#my.sh
PWD=bla
sed 's/xxx/'$PWD'/'
...
$ ./my.sh
xxx
bla
Which is fine.
But, if i run:
#my.sh
sed 's/xxx/'$PWD'/'
...
$ ./my.sh
$ sed: -e expression #1, char 8: Unknown option to `s'
I read in tutorials that to substitute env. variables from shell you need...
For example, when I run man ioctl the page says IOCTL(2) at the top. What does that mean? Is there an IOCTL(1)? And how does one navigate between these?
...
If I statically link an executable in ubuntu, is there any chance that that executable won't work within another distribution such as mint os? or fedora? I know processor types are affected, but other then that is there anything else I have to be wary of? Sorry if this is a dumb question. Thanks for any help
...
I want to open a file which is periodically written to by another application. This application cannot be modified. I'd therefore like to only open the file when I know it is not been written to by an other application.
Is there a pythonic way to do this? Otherwise, how do I achieve this in Unix and Windows?
edit: I'll try and clarify....
My code
$ *.php | grep google
How can I print the filenames and linenumbers next to each match?
...
I'm trying to use mprotect API on MacOSX 10.4 (tiger), I tried every possible way i know , it always returns -1, with errno 13, which means "permission denied" while I'm trying to add the write permission to some executable code.
The same code exactly works on MacOS X 10.5 (leopard).
the code is pretty simple
int ret = mprotect((void*...
As part of an intricate BASH script, I'd like to execute a command on a remote system from within the script itself.
Right now, I run the script which tailors files for the remote system and uploads them, then through a ssh login I execute a single command.
So for full marks:
How do I log into the remote system from the bash script (...
I'm writing a unit test for my UTF8 manipulation library, and I want my test to segfault if a function goes into a buffer overflow. So I came up with the idea to mmap two pages next to each other in memory, the first with PROT_READ | PROT_WRITE, and the second with PROT_NONE. That way, if any overflow occurs, a segfault is guaranteed. ...
Hi guys, I'm writing a program that writes output to a file. If this file doesn't exist, I want to create it.
Currently, I'm using the following flags when calling open:
O_WRONLY | O_CREATE
However, when this creates the file, it doesn't give me any permissions to write to it...
How can I use open so that it creates a file if it doesn...