Voytek wrote:
what the easiest way to get to all '.bash_history' files on the whole drive ?


getent passwd | cut -d ':' -f 6 | (while read i; do cat $i/.bash_history; done)

where
  getend passwd
    lists all the records in the password system (be it /etc/passwd file, NIS, 
LDAP or whatever)
  cut -d ':' -f 6
    gets the home directory field from those records
  while read i
    loops through each of those directories
  cat $i/.bash_history
    is the command you want to run
    a more refined version might say
      if [ -f $i/.bash_history ]; then echo "--- $i ---"; cat $i/.bash_history; 
fi

Best of luck,
Glen
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to