Sourcing a Directory

Carl Karsten carl at
Mon Jun 13 02:45:00 UTC 2005

Matthew S-H wrote:
> How do I "source" a directory?
> ie:  How might I have a line in my "~/.bash_profile" that  automatically 
> runs "source ~/.bash_profile_pieces/*" where the "*"  evaluates to each 
> file in ~/.bash_profile_pieces/"?  I tried running  it with the star and 
> it only 'sourced' the first file (alphabetically).

Um, here is an off the cuff guess:

$ find ~/.bash_profile_pieces/* -exec echo source {} \;

the "echo" will show you the commands it would execute - if it is what you want, 
take out the echo.

Carl K

More information about the ubuntu-users mailing list