Quantcast
Channel: Shrink/reset directory size? - Server Fault
Viewing all articles
Browse latest Browse all 4

Answer by user313114 for Shrink/reset directory size?

$
0
0

I'd do it like this.

cp -aloldirnewdir&&mvolddirtempname&&mvnewdirolddir&&rm -rtempname

where olddir is the directory you want to shrinknewdir and tempname are temporary filenames

cp -al creates links to the content of olddir in newdirand the next three commands swap them with newdir and clean up.


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>