I've have been desperately searching for a tutorial on how to use the mount() function properly (they are very good at hiding this knowledge).
I need to use it to MNT_UPDATE " / "(/dev/disk0s2 in this case) in single user mode but I can't find an example or tutorial on how to use the function.
ps. Please no "Use system()"
pps. I know /...
Hi folks,
I have a nightly database backup which I would like to scp to a remote server. As near as I can tell scp cannot be invoked with a password in the command and instead you need to set up keys for the servers?
Per this http://www.spaceprogram.com/knowledge/cron_scp.html
The remote box owner does not want me to set up the keys ...
I am porting some C++ code from Unix to Linux (Red Hat).
I have run into the following pattern:
ostream& myfunction(ostream& os)
{
if (os.opfx())
{
os << mydata;
os.osfx();
}
return os;
}
The functions opfx and osfx are not available under Red Hat 4.5. I saw a suggestion here to use the ostream::sentry functionality:...
Whenever we use the command:
dir --> in Windows
and
dir -a --> in Unix
We see 2 kinds of dots:
.
..
Appear in the directories.
Now in APUE by Stephens Rago, it says these are filenames and some books say these are directories.
What are these Dots about anyway?
Please provide an answer w.r.t. Windows as well as Unix if possible....
How would you delete files which in sub-directories where the sub directory matches a pattern?
For e.g.
/
/deletea
/deleteb
/dira
/deletea/file1
/deleteb/file1
/dira/file1
Now I want to delete all files in the directory where the directory matches the pattern delete*
What I came up with is:
find . -name 'delete*'| xargs -I{} ...
I found out the nohup tool today, and was wondering about it's implementation. Specifically, it seems like there must be a way to tell another process, or a child process, to ignore certain signals. Is there a system call, or something like that, that does this?
...
Heya, how goes it?
I've run visudo and added my username to the list to be able to do whatever I need to rather than logging in as root user.
I have my svn push out file's through ftp as user www-data, and therefore when I try to cd into those directories, I get permission denied.
Any thoughts? Can I add my username to some config file...
When using ar with an archive name that already exists, this message is generated:
+ ar rcs /tmp/libcpfs.a.3nbsv /tmp/cpfs.c.ERGsn /tmp/log.c.1lk6G
ar: /tmp/libcpfs.a.3nbsv: File format not recognized
The existing archive name is either an empty file (created by mktemp).
I want to clobber whatever contents are there anyway, the conte...
Hopefully fairly straightforward, to explain the use case when I run the following command (OS X 10.6):
pwd | pbcopy
the pasteboard contains a newline character at the end. I'd like to get rid of it.
...
Bit of a puzzle for you guys. I can come up with blunt workaround (below) but I thought it would present it to you all to see if there was a more elegant solution out there. Keep in mind I'm looking for a PHP or MySql only solution.
Tables is 'candles2'. I have a MySQL TEXT column 'time' that has a datestamp in it ( e.g. 2010.08.13 19:3...
Updated :
Thanks for your answers. As I said, my q was just a translation of my usecase.
Let me get into more details of what I want to achieve.
In my dev env, we use "ade" as our version control system what I want to do is :
ade describetrans | awk '/myapps/{ print $2 }' | sort -fr | xargs -iF ade unbranch F
Now, every single ti...
Hi, I recently made my first device to PC connection using USB. for Pc side, I used LibUSB-win32 library. This experience made me think - are system drivers (those who came with OS) written on some special level, which cannot be achieved otherwise? More exactly, are they so deep integrated into OS that no user-written driver can be writt...
We have a situation where a binary from our build system is failing in one specific flow but the same from dev works fine. We are sure that build system picks up the right libs and code, however we see a difference of 6000 bytes in both. (build - 6000 bytes = size of dev binary)
Hence we would like to know:
a. How we can compare two Uni...
Hi,
Is there an OS command I can run from within a Xen based virtual machine to tell me that it is a virtual box rather than a physical box - I heard that the kernel had some self awareness smarts about it. e.g. like an extra column in "ps" output or something? [I know vmstat provides the "st" column but I have seen this on physical hos...
I am using Debian. I have unixODBC installed as well as FreeTDS. I am using PHP
I have read several How-Tos and am stuck on a problem.
I tested FreeTDS by using tsql and it works.
I tested unixODBC by using isql and it works.
When I created a script in PHP and tried to access a database I get the following errors.
Fatal error: Call...
Hello all
On my Unix web server, I have two MySQL database servers running. One on port 3306, and another on 3307. I wanted to specify the port number of database to connect in /config/database.php of codeigniter.
I tried this....
$database['hostname'] = "localhost:3307";
This did not work. The webapp connected to database on port 3...
I try to execute the following command and receive this error:
[root@localhost ~]# isql -v asterisk-connector
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libmyodbc.so' : /usr/lib/libmyodbc.so: cannot open shared object file: No such file or directory
[ISQL]ERROR: Could not SQLConnect
I have checked and libmyodbc.so does...
Hi,
Can anyone please give me any good link where i can get some info on how to program with ptrace for HP-UX.
Please don't post links for linux ptrace.
...
Hi,
I have a list of directories starting from /root. Eg
random text /root/dir1/files random end
delete me /root/dir1/files/2dir I am waste
/root/examples/source alalalala
/root/example/header some other text
I want to use sed to take from every line the directory and remove everything else. My final output must be
/root/dir1/f...
I am new to shell scripting so i need some help need how to go about with this problem.
I have a directory which contains files in the following format. The files are in a diretory called /incoming/external/data
AA_20100806.dat
AA_20100807.dat
AA_20100808.dat
AA_20100809.dat
AA_20100810.dat
AA_20100811.dat
AA_20100812.dat
As you ca...