Archiving
Project Archiving using tar
- Use the command
tarto compress (gzip) the hpcLaunch folder on UCloud - Check the size of the folder and compare it to the uncompress version. Use the
ducommand (disk usage) - Without unpacking the file, print the “table of contents”
- Unpack and save it to a new directory
day1-copy - Transfer the compress folder locally and calculate the resources in time (
rsync --progress). - Now, do the same for the uncompress version
HintSolution
# 1. Tar and compress
tar tar -czvf hpcLaunch.tar.gz hpcLaunch
# 2. Size comparison
du -sh hpcLaunch
du -sh hpcLaunch.tar.gz
# 3. Use the -t flag, for the file specified with the -f flag followed by the filename
tar –ftz mytarfile.tar
# 4. Unpack into new dir
mkdir -p day1-copy
tar -xzvf hpcLaunch.tar -C day1-copy
# Transfer the compressed and uncompress folder using rsync (locally)
rsync -aP -e "ssh -i ~/.ssh/id_rsa -p <port>" ucloud@ssh.cloud.sdu.dk:/work/hpcLaunch PATH_LOCALCopyright
CC-BY-SA 4.0 license