Search Results

Search: Posts Made By: royinfo.alain
1,485
Posted By Corona688
Please use code tags, the...
Please use code tags, the https://www.unix.com/images/editor/code.png button, not icode tags.



What shell are you using? That works in both BASH and KSH.

You are correct, though, in that...
1,485
Posted By Corona688
Hm. If .sf are files, there's no point using...
Hm. If .sf are files, there's no point using find here, since a simple loop will work just as good.

FILES=""
for FILE in *.sf
do
FILE2="${FILE/.sf}".sfd
[ -e "$FILE2" ] &&...
1,485
Posted By stomp
tar -T - reads filenames from stdin(= from find)....
tar -T - reads filenames from stdin(= from find). ... if your version of tar supports -T


find /your/path -mtime -10 | tar -cf backup.tar -T -
1,807
Posted By RudiC
The request seems to be to add a .* to every...
The request seems to be to add a .* to every single file name, have it an extension or not. Try this small adaption to MadeInGermany's proposal:
find * -type f -mtime -365 | sed 's/[.][^.]*$//;...
1,807
Posted By MadeInGermany
... or the script is run with "sh -x"; the -x...
... or the script is run with "sh -x"; the -x option also turns on the debug mode.

The following will run faster, and log less in debug mode
find * -type f -mtime -365 |
# replace a trailing...
1,807
Posted By Corona688
To keep the forums high quality for all users,...
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read...
Forum: HP-UX 08-08-2016
10,341
Posted By drl
Hi. On a system I sometimes use: OS,...
Hi.

On a system I sometimes use:
OS, ker|rel, machine: HP-UX, B.11.11, 9000/785
Distribution : GenericSysName [HP Release B.11.11] (see /etc/issue)
/bin/tar - ( /bin/tar May 23 2007 )...
Forum: HP-UX 08-08-2016
10,341
Posted By stomp
ok. Seems your cpio does not understand...
ok. Seems your cpio does not understand --format=crc. Just leave that option out. --make-directories is not understood either.
Forum: HP-UX 08-08-2016
10,341
Posted By stomp
find * -type f -mtime -100 -exec tar cf - {} + |...
find * -type f -mtime -100 -exec tar cf - {} + | gzip > $MAITUT/BCK_DATA.tar.gzAs stated from others here: The above command will break when there are too many files found.

This is an alternative...
Forum: HP-UX 08-08-2016
10,341
Posted By RudiC
Hmmm - isn't it that tar expects the files to...
Hmmm - isn't it that tar expects the files to create an archive from on the command line? Doesn't it use stdin only when extracting from a data stream?

So xargs WOULD be needed to supply the file...
Forum: HP-UX 08-08-2016
10,341
Posted By vbe
Looking at Rudi's find * -type f -mtime...
Looking at Rudi's
find * -type f -mtime -$nb_days -print | xargs tar cf - | gzip > $MAITUT/BCK_DATA.tar.gz
I would say xarg is useless and will give you trouble and is maybe what is upsetinf you...
Forum: HP-UX 08-08-2016
10,341
Posted By rezasadeghi
hello you can use this code: find * -type...
hello
you can use this code:

find * -type f -mtime -$nb_days -print -exec tar cvf {} \; && bzip2 *.tar




Please use CODE tags as required by forum rules!
Forum: HP-UX 08-08-2016
10,341
Posted By rbatte1
These options will struggle with too many...
These options will struggle with too many filenames because xargs will produce multiple commands from the list. The command xargs (as I understand it) will take the input list and try to make a...
Forum: HP-UX 08-05-2016
10,341
Posted By MadeInGermany
find * -type f -mtime -$nb_days -print | xargs...
find * -type f -mtime -$nb_days -print | xargs tar cf - | gzip > $MAITUT/BCK_DATA.tar.gz
Maybe the following works as well (and handles special characters in filenames better)
find * -type f -mtime...
Forum: HP-UX 08-05-2016
10,341
Posted By RudiC
Does the tar without gzip contain anything?
Does the tar without gzip contain anything?
Forum: HP-UX 08-05-2016
10,341
Posted By RudiC
Je vous en prie. You already used a pipe in...
Je vous en prie.

You already used a pipe in your sample. Try (untested, may need further polishing)

find * -type f -mtime -$nb_days -print | xargs tar -cv | gzip > $MAITUT/BCK_DATA.tar.gz
Forum: HP-UX 08-05-2016
10,341
Posted By RudiC
What keeps you from just piping tar's stdout into...
What keeps you from just piping tar's stdout into gzip?
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 08:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy