1

Trying to clean up a directory on an HP/UX system that has a stupid number of files. I've already tried:

Create an archive of all files older than "x" days. (This method, using the find command, even when selecting only 5 days worth of files, ran "forever".)

So now I'm trying to just do one day at a time using a filemask:

tar -czf SV*20150227*.evt SV_EVT_FILES_ARCHIVE_20150227.tar'

Unfortunately, I'm getting an error like this:

tar: SV_EVT_FILES_ARCHIVE_20150227.tar: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

I followed the tutorial at: http://www.thegeekstuff.com/2010/04/unix-tar-command-examples/ but I'm obviously doing something wrong. Can anyone shed some light on where I screwed up?

Thanks

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940

1 Answers1

2

This is the rigth command to compress your file :

  tar -cvzf {Archive.tar.gz} {TargetFolder}

you did the opposite ;)

if you dont want to zip it, remove z param:

  tar -cvf {Archive.tar} {TargetFolder}
Froggiz
  • 3,013
  • 1
  • 18
  • 30