I use this in Ubuntu to take screenshots. Ubuntu comes built in with gnome-screenshot, but the file saving mechanism is lacking.
So, this will automatically file away your screenshots to your $HOME/Documents/screenshot/ folder, organized by year/year_month/file.png.
Where file.png is in the format yyyy_mmdd_hhmmss.png.
I use it to take an area screenshot of all my research notes, useful comments, gold nuggets, etc. The automatic folder organization files it away nicely, and keeps it organized as the years go by.
Create it and set the execute bit:
sudo vi /usr/bin/area_screenshot
chmod ugo+x /usr/bin/area_screenshot
Then copy the contents below: #!/bin/bash
screenshot_dir="$HOME/Documents/screenshot"
current_year_dir="$screenshot_dir/$(date +%Y)"
current_month_dir="$current_year_dir/$(date +%Y_%m)"
fileout="$current_month_dir/$(date +%Y_%m%d_%H%M%S).png"
# Step 1: Check for screenshot directory
[ -d "$screenshot_dir" ] || mkdir "$screenshot_dir"
# Step 2: Check year and month directory
[ -d "$current_year_dir" ] || mkdir "$current_year_dir"
[ -d "$current_month_dir" ] || mkdir "$current_month_dir"
# Step 3: Take area screenshot to the current month
[ -d "$current_month_dir" ] && /usr/bin/gnome-screenshot -a -f "$fileout" $@
Then map it to the printscreen key.