01-16-2014
Thanks and it worked ok. I removed while loop from my code.
9 More Discussions You Might Find Interesting
1. AIX
I have to zip many pdf files and the size of zip file must not exceed 200 MB. When size is more than 200 MB then multiple zip files needs to be created.
How we can achieve this in UNIX?
I have tried ZIP utility but it takes a lot of time when we add individual pdfs by looping through a... (1 Reply)
Discussion started by: tom007
1 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I have a set of large files ~ 500_900Mb I have generated and I'd like to quickly zip and copy them to a new folder elsewhere ...
Can anyone suggest a quicky ??
Cheers :) (3 Replies)
Discussion started by: pawannoel
3 Replies
3. Programming
Hi every one,
Please excuse me if any grammatical mistakes is there.
I have multiple xml files in one directory, I need to create multiple XML files into one XML file.example files like this</p>
file1:bvr.xml
... (0 Replies)
Discussion started by: veerubiji
0 Replies
4. Shell Programming and Scripting
Hi
I have a requirement in unix shell where I need to zip multiple files on server to one single .zip file. I dont see zip command in AIX and gzip command not doing completely what I want.
One I do .zip file, I should be able to unzip in my local Computer.
Here is example what I want... (9 Replies)
Discussion started by: RAMA PULI
9 Replies
5. Shell Programming and Scripting
I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also?
I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies
6. Shell Programming and Scripting
Hello everybody,
I have a double mission with some XML files, which is pretty challenging for my actual beginner UNIX knowledge. I need to extract some strings from multiple XML files and create a new XML file with the searched strings..
The original XML files contain the source code for... (12 Replies)
Discussion started by: milano.churchil
12 Replies
7. Shell Programming and Scripting
Hi,
I'm having a xml file with multiple xml header. so i want to split the file into multiple files.
Sample.xml consists multiple headers so how can we split these multiple headers into multiple files in unix.
eg :
<?xml version="1.0" encoding="UTF-8"?>
<ml:individual... (3 Replies)
Discussion started by: Narendra921631
3 Replies
8. UNIX for Beginners Questions & Answers
Hi all i am very new to shell scripting and need some help from you to learn
1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder.
2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies
9. Shell Programming and Scripting
Hi all i am very new to shell scripting and need some help from you to learn
1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder.
2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies
LEARN ABOUT DEBIAN
sd_login_monitor_unref
SD_LOGIN_MONITOR_NEW(3) sd_login_monitor_new SD_LOGIN_MONITOR_NEW(3)
NAME
sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd - Monitor login sessions, seats and users
SYNOPSIS
#include <systemd/sd-login.h>
int sd_login_monitor_new(const char* category, sd_login_monitor** ret);
sd_login_monitor* sd_login_monitor_unref(sd_login_monitor* m);
int sd_login_monitor_flush(sd_login_monitor* m);
int sd_login_monitor_get_fd(sd_login_monitor* m);
DESCRIPTION
sd_login_monitor_new() may be used to monitor login session, users and seats. Via a monitor object a file descriptor can be integrated into
an application defined event loop which is woken up each time a user logs in, logs out or a seat is added or removed, or a session, user,
or seat changes state otherwise. The first parameter takes a string which can be either seat (to get only notifications about seats being
added, removed or changed), session (to get only notifications about sessions being created or removed or changed) or uid (to get only
notifications when a user changes state in respect to logins). If notifications shall be generated in all these conditions, NULL may be
passed. Note that in future additional categories may be defined. The second parameter returns a monitor object and needs to be freed with
the sd_login_monitor_unref() call after use.
sd_login_monitor_unref() may be used to destroy a monitor object. Note that this will invalidate any file descriptor returned by
sd_login_monitor_get_fd().
sd_login_monitor_flush() may be used to reset the wakeup state of the monitor object. Whenever an event causes the monitor to wake up the
event loop via the file descriptor this function needs to be called to reset the wake-up state. If this call is not invoked the file
descriptor will immediately wake up the event loop again.
sd_login_monitor_get_fd() may be used to retrieve the file descriptor of the monitor object that may be integrated in an application
defined event loop, based around poll(2) or a similar interface. The application should include the returned file descriptor as wake up
source for POLLIN events. Whenever a wake-up is triggered the file descriptor needs to be reset via sd_login_monitor_flush(). An
application needs to reread the login state with a function like sd_get_seats(3) or similar to determine what changed.
RETURN VALUE
On success sd_login_monitor_new() and sd_login_monitor_flush() return 0 or a positive integer. On success sd_login_monitor_get_fd() returns
a Unix file descriptor. On failure, these calls return a negative errno-style error code.
sd_login_monitor_unref() always returns NULL.
NOTES
The sd_login_monitor_new(), sd_login_monitor_unref(), sd_login_monitor_flush() and sd_login_monitor_get_fd() interfaces are available as
shared library, which can be compiled and linked to with the libsystemd-login pkg-config(1) file.
SEE ALSO
systemd(1), sd-login(7), sd_get_seats(3)
AUTHOR
Lennart Poettering <lennart@poettering.net>
Developer
systemd 10/07/2013 SD_LOGIN_MONITOR_NEW(3)