Files
boot
etc
home
default
.config
.fonts
.local
scripts
add-song
create-playlist
del-macos-folders
generate-playlists
hash-filenames
list-packages
prep-camera-photo
proverb
record-screen
record-screen-no-audio
refresh-screens
remove-exif
restart-bluetooth
screenshot
standardize-music
sync-car
sync-mp3-player
syncthing-rm-conflicts
syncthing-rm-stversions
system-download
system-free-space
system-update
system-update-mirrors
titles-to-youtube-playlist
wget-titles-from-urls
youtube-archive
youtube-archive-audio
youtube-audio
.bashrc
.profile
.tool-versions
.gitignore
packages.txt
preview.png
readme.md
dotfiles/home/default/scripts/hash-filenames
shibao e77854b6b5 add sway config
add bashrc
ignore xauthority
add autounlocking keepass desktop entry
add fonts for waybar
add alacritty config
move scripts location and adjust bashrc
use materia
theme sway and lockscreen
add list packages script
add ranger desktop item
add mpd config
add indicator ring to swaylock
remove mpd password
add global asdf tool versions
add mako config
update keys
add swaylock theme
add suspend to lock config
move ssh commands to aliases
tweak mpd section in waybar
add kanshi config for work
update bashrc
2021-11-20 18:17:22 -05:00

16 lines
407 B
Bash
Executable File

#!/usr/bin/env bash
set -eou pipefail
read -rep $'Do you want to rename all files in this dir to their hash? [Y/n] \n> ' -n 1 REPLY
REPLY=${REPLY:-Y}
if [[ $REPLY =~ ^[Yy]$ ]]
then
for file in *; do
if [[ -f "./$file" ]]; then
sum=$(echo -n "$file" | md5sum)
echo "$file --> ${sum%% *}.${file##*.}"
mv "$file" "${sum%% *}.${file##*.}"
fi
done
fi