Managing Disk Space
To free precious disk space, one has essentially two possibilites:
- Erase files which are no longer needed.
- Archive and compress rarely used files.
Archiving means to store a whole subdirectory into a single file.
For example, to archive the subdirectory "mydir" into a file "mydir.tar",
tar cvf mydir.tar mydir
Then you can compress the newly created file by typing:
Finally, don't forget to erase the old directory,
rm -r mydir
You now have archived and compressed the directory "mydir" into a file
To restore the directory, just do the reverse:
tar xvf mydir.tar