Basically there is a malformed 3rd party AIX process generating widow orphan files in a sensitive folder ... this has been ongoing for too long and needs to be cleaned up and kept clean until the real issue is resolved.
There are almost 6K files accumulated and continue to accumulate. I used the following script to attempt to clean up this mess but have run into another issue.
ls | grep blah > blah.txt
cat blah.txt | xargs -i mv "{}" archive/
the problem is this doesn't work because some of the filenames contain a '"' ... so I changed the script to
cat blah.txt | xargs -i mv `{}` archive/
no change
so I manually edited the blah.txt file and added a '\' in front of all the '"' entries and ran the script (without the ls) which did work
Is there a way to get around this problem without having to manually edit the list file?
There are almost 6K files accumulated and continue to accumulate. I used the following script to attempt to clean up this mess but have run into another issue.
ls | grep blah > blah.txt
cat blah.txt | xargs -i mv "{}" archive/
the problem is this doesn't work because some of the filenames contain a '"' ... so I changed the script to
cat blah.txt | xargs -i mv `{}` archive/
no change
so I manually edited the blah.txt file and added a '\' in front of all the '"' entries and ran the script (without the ls) which did work
Is there a way to get around this problem without having to manually edit the list file?