Created
July 15, 2025 17:39
-
-
Save adrienjoly/377c61eb7265ae774b18c6351c2277df to your computer and use it in GitHub Desktop.
a bash/terminal script to index the contents of a volume into a TXT file. tested on macOS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage ./index-volume.sh "Photos 2017-08" | |
# ... will index the list of files from "/Volumes/Photos 2017-08" | |
# ... to ~/Desktop/volumes/Photos 2017-08.txt | |
set -e # stop the script if any command fails with a non-zero exit code | |
mkdir -p ~/Desktop/volumes | |
ls -R "/Volumes/$1" > ~/Desktop/volumes/"$1.txt" | |
cat ~/Desktop/volumes/"$1.txt" | |
drutil eject external |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment