LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 06-29-2005, 06:51 AM   #16
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56

Hi freegianghu,

Tks for your script.

Quote:
To delete all extracted directories, run script like:
Code:
for input in `ls` ; do
  if [ -d $input ]; then
    echo "Removing $input" && rm -rf $input
  fi
done
I suppose it is a bash script. The script will look like
Code:
#!/bin/bash
for input in `ls` ; do
  if [ -d $input ]; then
    echo "Removing $input" && rm -rf $input
  fi
done
and save it to
/mnt/lfs/home/abc.sh

Not on the Host FC3.

Then
chmod +x abc.sh

Leave all package-tarballs and patches in $LFS/sources. If I'm wrong please correct me.

TIA

B.R.
satimis
 
Old 06-29-2005, 07:00 AM   #17
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by satimis
Hi freegianghu,

Tks for your script.

I suppose it is a bash script. The script will look like
Code:
#!/bin/bash

for input in `ls` ; do
  if [ -d $input ]; then
    echo "Removing $input" && rm -rf $input
  fi
done
and save it to
/mnt/lfs/home/abc.sh

Not on the Host FC3.

Then
chmod +x abc.sh

Leave all package-tarballs and patches in $LFS/sources. If I'm wrong please correct me.

TIA

B.R.
satimis
You are right!!! You must be sure that you are in $LFS/sources before running this script.
Code:
#!/bin/bash

cd $LFS/sources && 
{
  for input in `ls` ; do
    if [ -d $input ]; then
      echo "Removing $input" && rm -rf $input
    fi
  done 
}
Cheers,
GH
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
Submount, "permission denied" when writing to floppy as normal user DaneM Linux - Software 5 02-22-2006 02:05 PM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 04:07 AM
mkdir ../binutils-build permission denied TheBman Linux From Scratch 11 02-16-2004 08:39 AM
"permission denied" when I try to send raw data to the sound device. Travis86 Linux - Hardware 2 10-29-2003 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration