source: clfs-embedded/BOOK/cleanup/remove-files.xml@ 6d396081

Last change on this file since 6d396081 was 2ef8466, checked in by Andrew Bradford <bradfa@…>, 14 years ago

Added ${CLFS}-final/build dir to be rm'ed

In the Copy to Target section, a $CLFS/build directory is created.
Should this not be the first time you do the Remove Unnecessary Files
section, a $CLFS/build directory will exist. Need to ensure it gets
deleted from ${CLFS}-final/ since it contains tarballs that aren't needed
on the final system.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-cleanup-remove-files">
9 <?dbhtml filename="remove-files.html"?>
10
11 <title>Remove Unnecessary Files</title>
12
13 <para>The system is almost finished. It can be made smaller by removing
14 files that are not necessary.</para>
15
16 <para>Create a copy of the file system in case changes need to be made
17 to it later:</para>
18
19<screen><userinput>install -dv ${CLFS}-final
20cp -arv ${CLFS}/* ${CLFS}-final/</userinput></screen>
21
22 <para>Remove files that aren't needed:</para>
23
24<screen><userinput>rm -rfv ${CLFS}-final/cross-tools
25rm -rfv ${CLFS}-final/usr/src/*
26rm -rfv ${CLFS}-final/usr/include
27rm -rfv ${CLFS}-final/usr/man
28rm -rfv ${CLFS}-final/usr/share/man
29rm -rfv ${CLFS}-final/build</userinput></screen>
30
31 <para>Remove the static libaries:</para>
32
33<screen><userinput>FILES="$(ls ${CLFS}-final/lib/*.a ${CLFS}-final/usr/lib/*.a)"
34for file in $FILES; do
35 rm -fv $file
36done</userinput></screen>
37
38</sect1>
Note: See TracBrowser for help on using the repository browser.