Search Results

Search: Posts Made By: Corona688
4,867
Posted By Corona688
It must run a BASH shell for each child.
It must run a BASH shell for each child.
4,867
Posted By Corona688
Don't think xargs works that way. Not a shell...
Don't think xargs works that way. Not a shell internal, can't run shell functions.
4,867
Posted By Corona688
And this is a problem why? Doesn't seem to...
And this is a problem why?

Doesn't seem to work that way, and I can't imagine why it would. Why wouldn't all three execs get the exact same files? Does this actually happen? find doesn't run...
4,867
Posted By Corona688
I take it this script would run automatically at...
I take it this script would run automatically at intervals. Given that, I think you could make your approach work. I'd break the archiving and deleting into two steps, so you can bail in case of...
4,867
Posted By Corona688
Since tar may be run multiple times, you need to...
Since tar may be run multiple times, you need to use the append option, not the create option.

How about:

$ tar -rf archive.tar # Create empty tar file to append to

$ find testout -type f...
4,867
Posted By Corona688
I still don't understand what that tar command is...
I still don't understand what that tar command is intended to do.

What filename is it supposed to create, and where?
4,867
Posted By Corona688
>> /directory/backup/log/2.log is similarly...
>> /directory/backup/log/2.log is similarly handled by shell, not exec, but in this case probably does close to what you want, except it will capture all stdout, not just ls. This may not matter if...
4,867
Posted By Corona688
What -exec tar -cvf * /something/ * does only...
What -exec tar -cvf * /something/ * does only depends on your current directory, because the *'s are evaluated by the shell before it is run. exec is not a shell and would not handle the *'s if you...
Showing results 1 to 8 of 8

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