I’m running the following line from the apache logs directory to move older (previously zipped) logs to a storage location:
/usr/local/apache2.2/logs$ find . -name '*.gz' -exec cp {} /home/itadmin/temp4{} \;
The result is slightly off due to the ‘.’ included in the returned file path:
cp: cannot create regular file `/home/itadmin/temp4./default/error/error.1315029600.gz': No such file or directory
Is there a simple way to eliminate the ‘.’ from the file path while still utilizing the above command as closely as possible to the way it’s written now?
You can copy all files in one invocation of
cplike this:Or just add a slash to your original command: