36
loading...
This website collects cookies to deliver better user experience
organize.sh
#!/bin/bash
mkdir
command like so;mkdir Image_Files Audio_Files Video_Files PDFs Scripts Compressed_Files
.png .jpg .gif .tif
and others. So we need our script to look for anything with that specific extension and move it to the folder labelled Image_Files. A command like that would look something like this;mv *.png *.jpg *.jpeg *.tif *.tiff *.bpm *.gif *.eps *.raw Image_Files
#Image Files
mv *.png *.jpg *.jpeg *.tif *.tiff *.bpm *.gif *.eps *.raw Image_Files
# Audio Files
mv *.mp3 *.m4a *.flac *.aac *.ogg *.wav Audio_Files
# Video Files
mv *.mp4 *.mov *.avi *.mpg *.mpeg *.webm *.mpv *.mp2 *.wmv Video_Files
# PDFs
mv *.pdf PDFs
# Scripts
mv *.py *.rb *.sh Scripts
#Compressed Files
mv *.rar *.zip Compressed_Files
echo "All done organizing your messy messy downloads Folder"
chmod u+x organize.sh
./organize.sh
cd Scripts
mv organize.sh ..
cd ..
#!/bin/bash
#Create Folders
mkdir Image_Files Audio_Files Video_Files PDFs Scripts Compressed_Files
#Image Files
mv *.png *.jpg *.jpeg *.tif *.tiff *.bpm *.gif *.eps *.raw Image_Files
# Audio Files
mv *.mp3 *.m4a *.flac *.aac *.ogg *.wav Audio_Files
# Video Files
mv *.mp4 *.mov *.avi *.mpg *.mpeg *.webm *.mpv *.mp2 *.wmv Video_Files
# PDFs
mv *.pdf PDFs
# Scripts
mv *.py *.rb *.sh Scripts
#Compressed Files
mv *.rar *.zip Compressed_Files
cd Scripts
mv organize.sh ..
cd ..
echo "All done organizing your messy messy downloads Folder"
alias sl=ls
npx create-react-app newApp
you could have an alias as cra newApp
. This would be defined by:alias cra="npx create-react-app"
alias organize="cd ~/Downloads && ./organize.sh"
vim ~/.bashrc
alias organize="cd ~/Downloads && ./organize.sh"
source ~/.bashrc
so that you can have those changes enacted on the current terminal.