BLFS‎ > ‎

1. Preparation

created : 2010-02-03   updated : 2010-02-03
 
The whole section of BLFS will assume that we are using the bootable blfs.vdi created in "LFS -->Beyond".
 
Now boot into the virtual machine with blfs.vdi.
 
Before doing anything, check the space available first :
cd /sources
df .
 
I found BLFS is already using 5.3G of my 7G partition.
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              7218432   5364440   1487312  79% /
 
So I had to do some cleanup.  I decided to remove all sources directory created in the process of building LFS.

List all directory :
cd /sources
ls -F -1 | grep "/"
 
Use the following command to create a remove script :
ls -1 -F | grep "/" | awk -F "/" '{ print "rm -rf",$1 } ' | tee remove_all.sh
 
Note : remove_all.sh is very destructive, be sure to check its content before execution
cat remove_all.sh | more

If everything looks ok, execute remove_all.sh :
chmod 755 remove_all.sh
./remove_all.sh
 
 
Check size again :
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              7218432   1587804   5263948  24% /
 
End
 
Comments