Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env
- echo "Reading bash histories..."
- echo "Making directory for storing history files in ~/compiled_bash_histories"
- mkdir ~/compiled_bash_histories
- mkdir ~/compiled_bash_histories/home
- for D in `find /home/ -mindepth 1 -maxdepth 1 -type d `
- do
- echo "${D}"
- if [ -f "${D}"/.bash_history ]
- then
- echo "Bash history for the user located in ${D} found..."
- #mkdir ~/compiled_bash_histories${D}
- cat "${D}"/.bash_history > ~/compiled_bash_histories${D}.bash_history && echo "Saved..."
- fi
- done
- mv ~/compiled_bash_histories/home/* ~/compiled_bash_histories
- rmdir ~/compiled_bash_histories/home
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement