I cannot figure out what is in those arrays. Parsing ls into an array, and find into a string variable, is very likely to eventually break. It is best to operate using NUL delimited filenames printed from find. We can also have it print the date.
Code:
destprefix=/tmp/tars
find . -maxdepth 1 -type d -printf '%Ts %TY-%Tm %f\0' | sort -znk1 | while read -rd '' epoch date dir && ((max++ < 2))
do
dest=$destprefix/$date
echo mkdir -p "$dest"
echo tar -zcvf "$dest/$dir.tar.gz" "$dir"
done
remove the echos if it prints what seems correct
This User Gave Thanks to neutronscott For This Post:
hey programmers!
1-why won't gcc accept as an argument? i tried the recommendations on the man page of getch(),..etc. nothing worked.
2-why it won't see <iostream> && <fstream> even if i implemented the function as follow
std::cout<<"..etc"<<endl;
3-after i type this code in it gives... (6 Replies)
After I log ino the machine, a window pops up indicating that I should check that the HOSTNAME is the same in these three files
/etc//rc.configd/netconf
/etc/hosts
/var/adm/inetd.sec
How do I change the hostname in these files?
Thanks,
Mike h (1 Reply)
Hello:
NOOB here. I attempted to use smit mkcd. Failed on first attempt, not enough space. 2nd attempt tried to place iso on /usr, not enough space there. Cleanup ran for about 5 minutes after aborting. Now AIX won't boot. LCD display on 7029-6E3 says: 0517 MOUNT /USR. Attempted to boot from CD... (11 Replies)
hi all.
Please help me with archiving previous day syslog files.
the files have no extension and have the format YYYY-MM-DD.
I want to archive the file then move it to some other machine.
thanks. (2 Replies)
Hi there,
I have one huge archive (it's a system image).
I need sometime to create smaller archives with only one or two file from my big archive.
So I'm looking for a command that extracts files from an archive and pipe them to another one.
I tried the following :
tar -xzOf oldarchive.tgz... (5 Replies)
AIX 5.3-5300.09.06.1013 (AIX 5.3 TL9 SP6)
# startsrc -s xntpd -a "-x"
(with -x at the end of the xntpd line in /etc/rc.tcpip, too.)
will run for 5-15 minutes, and then die.
# errpt -a
with a search on xntpd gives me this:
------------------------------------------------
LABEL: ... (7 Replies)
I have a set of files in path /ifx01/etldata/lmt/
a.xml
b.xml
I have to archive & move these files to path /ifx01/etldata/archive ,so that not even the original files should exists.
After acrhiving there should be no files in path /ifx01/etldata/lmt/ (6 Replies)
HI,
I need to move all files from a dir & its all subdir to Archive folder which is indise dir only. and moved filename should changed to complete path ( Like Dir_subdir_subdir2_.._filename ). also all files names shoud capture in a file in order to mail
I written below code ... (11 Replies)
Requirement:
Under fuse application we have placeholders called containers;
Every container has their logs under:
<container1>/data/log/fuse.log
<container1>/data/log/fuse.log.1
<container1>/data/log/fuse.log.XX
<container2>/data/log/fuse.log... (6 Replies)
Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)
Discussion started by: yelirt5
3 Replies
LEARN ABOUT DEBIAN
wmemcpy
WMEMCPY(3) Linux Programmer's Manual WMEMCPY(3)NAME
wmemcpy - copy an array of wide-characters
SYNOPSIS
#include <wchar.h>
wchar_t *wmemcpy(wchar_t *dest, const wchar_t *src, size_t n);
DESCRIPTION
The wmemcpy() function is the wide-character equivalent of the memcpy(3) function. It copies n wide characters from the array starting at
src to the array starting at dest.
The arrays may not overlap; use wmemmove(3) to copy between overlapping arrays.
The programmer must ensure that there is room for at least n wide characters at dest.
RETURN VALUE
wmemcpy() returns dest.
CONFORMING TO
C99.
SEE ALSO memcpy(3), wcscpy(3), wmemmove(3), wmempcpy(3)COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 1999-07-25 WMEMCPY(3)