I am trying to get Saturday's date of the week in Linux C. Using the function time and localtime, I got today's date and time details. How to proceed further to get Saturday's date?
#include <time.h>
#include <stdio.h>
#include <string.h>
int main()
{
char date[20];
struct tm *curr_tm = NULL;
time_t curr_time;
curr_time = tim...
I am trying to compile a small .c file that has the following includes:
#include <openssl/ssl.h>
#include <openssl/rsa.h>
#include <openssl/x509.h>
#include <openssl/evp.h>
In the same folder where i have the .c file I have a /openssl with all those files (and more), also in synaptic package manager I see OpenSSL installed, I am tryin...
Hi, i am learning shell scriptnig,
is there any way i can test the operation like checking file permission on a file..
like...
i know some of the way like. searching the file through find command using permission,
or in "ls...| grep 'r--r--r' smthg.. whatever permission u wan't
I have some file how i check whether the file have the requ...
I need to install the file 'html.sty', but don't know what package it's in. I think I need to install something called latex2e, but I don't know what package has that.
...
Hi,
I have written a backend for creating ftp-users for proftpd via MySQL-module. After deleting a user from database some OS-specific tasks are left: deleting or moving the files of the user on file system level ("rm -R /home/dir/of/deleted/user").
The backend runs under linux user A, the ftp root belongs to user B. Therefore and for ...
Hi,
I'm trying to automate some debugging tasks. In certain cases, I print the value of $ra [this is a MIPS machine] and parts of the stack as hex addresses. During debugging, I use addr2line to convert them into file:line pairs.
I'd like to automate this procedure.
The problem is that addr2line returns a filename that equivelent to t...
Possible Duplicate:
check what files are open in Python
Hello,
Is it possible to obtain a list of all currently open file handles, I presume that they are stored somewhere in the environment.
I am interested in theis function as I would like to safely handle any files that are open when a fatal error is raised, i.e. close f...
Hi,
I am a newbie to developing drivers for Linux ... . I am developing a SMS-driver (AT commands over serial port to modem) using TTY for accessing the serial port. The driver is written in C.
In the design messages from modem to driver can be triggered by two events:
1) Status as respond to AT commands issued by driver (i.e. expect...
Hi,
I wanted the source code for top which I could not find anywhere also, i wanted a little more information on what exactly does the /proc directory contain.y I have seen it have a series folders labeled 1, 2, 3 4, .... and in those folders there seem to be a consistent set of files. I was wondering if these are the directories for t...
At some point during my C programming adventures on Linux, I encountered flags (possibly ioctl/fcntl?), that make reads and writes on a file descriptor uninterruptible.
Unfortunately I cannot recall how to do this, or where I read it. Can anyone shed some light?
Update0
To refine my query, I'm after the same blocking and guarantees th...
Hi everyone,
I created a fuse mountpoint. After mounting, the file permissions are all screwed up and it says I cannot ls or cd. Permission denied.
The file permissions look like this:
d????????? ? ? ? ? ? temp
and when i list the mounted devices I get:
/dev/fuse on /temp type fuse (rw,nosuid,nodev)
I used mono-fuse. I just created a...
gI've compiled the kernel to support USB HID and keyboard devices. When I plug in the USB keyboard, the kernel recognizes it, and goes so far as to latch/unlatch the NUMLOCK led when I press the same key.
Is there a dev file entry I can create so I can read (cat /dev/input/...) data from the USB keyboard?
I appreciate that I might be l...
Hello, I have some script, that uses files in directories around it. It uses
dirname $0
command.
And it should work from any directory from where I will run this script, but when I run symbolic link that points to that script, I get the path of symbolic link like an output of dirname rather than the path of the script itself.
Any on...
I am trying to compile android source code under ubuntu 10.04.
I get the following error saying "/usr/bin/ld: cannot find -lz". Can you please tell me how can I fix it? what does "can't find -lz" mean?
external/qemu/Makefile.android:1101: warning: overriding commands for target `external/qemu/android/avd/hw-config-defs.h'
external/qemu...
What is the MD5 Fingerprint field before the PEM data of a CA cert in ca-bundle.crt used for by consuming applications? When I enter the hash incorrectly, I find that I'm still able to use openssl to start a TLS session with a server whose cert is signed by that CA.
Example:
American Express CA
MD5 Fingerprint: 1C:D5:8E:82:BE:70:55:8...
I'm working on a machine which has some code running on it which sets the time when I set the password. The time set is epoch time, but it has 13 digits in it, and when I wrote a simple program to get the epoch time and ran it on my personal computer running linux, it returns the epoch time which has 10 digits. Would anyone know what the...
I am trying to compile a small .c file which uses OpenSSL includes, at first I had problems compiling but I solved it installing libssl-dev and that solved the include errors.
But now when I try to compile I get:
‘ssl_conn’ has no member named ‘encrypted’
‘ssl_conn’ has no member named ‘write_seq’
‘ssl_conn’ has no member named ‘read_s...
Just like a "net send" on Windows, if I remember what net send does correctly. I just want to say something like:
<command> <IP address> "Hey what's up?"
and the message "Hey what's up?" should show up on the other guy's machine. Ideally this shouldn't require installation of any packages not already present in typical UNIX/Linux dist...
I was wondering how I could do something like this (source) using Qt. I looked through the documentation but couldn't find any method to check if an external process is running.
if [ "$(pidof ksmserver)" ]; then
echo "KDE running."
# KDE-specific stuff here
elif [ "$(pidof gnome-session)" ]; then
echo "GNOME running."
# GNOM...
I can extract and read messages from PST files using libpst , but i want to extract from edb files too (not online exchange server but from offline files). And in Linux.
Any python lib or any kind for linux commandline tool should help.
Thanks.
...