Skip to content

Instantly share code, notes, and snippets.

View connormclaud's full-sized avatar

Vitali Vinahradski connormclaud

  • Berlin, Germany
View GitHub Profile
@connormclaud
connormclaud / dropbox_status.sh
Created February 14, 2024 16:34
extend dropbox status with list of files changed in last 24h
#!/bin/bash
# Change to your Dropbox directory
cd ~/Dropbox
/usr/bin/dropbox status
# Find files modified in the last day and print their last modification time
find . -type f -mtime -1 -print0 | while IFS= read -r -d '' file; do
mod_time=$(date -r "$file" +"%Y-%m-%d %H:%M:%S")
time_ago=$(echo $(($(date +%s) - $(date +%s -r "$file"))))