Hi Guys,
We have number of files in some directories that we need to compress, so basically we want to compress each file older than 2 days but excluded some files in each directory that have been compressed (with extension .Z)
Can you please give me the one liner :
I found something like this
but not sure whether it's working in unix solaris 10.
anything simpler than this?
cheers,
We have number of files in some directories that we need to compress, so basically we want to compress each file older than 2 days but excluded some files in each directory that have been compressed (with extension .Z)
Can you please give me the one liner :
I found something like this
Code:
find dir1 dir2 dir3 -type f -mtime +2 ! -name "*.Z" | xargs compress
but not sure whether it's working in unix solaris 10.
anything simpler than this?
cheers,