Day 212
Delete files older than X days/hours via linux find
- bash - How to delete files older than X hours - Stack Overflow
find $LOCATION -name $REQUIRED_FILES -type f -mtime +1 -delete
for files older than one dayfind $LOCATION -name $REQUIRED_FILES -type f -mmin +360 -delete
for the same in minutes
Also relevant is mtime, ctime, and atime - modification time, change time, access time.
mtime changes when you write to the file. It is the age of the data in the file. Whenever mtime changes, so does ctime. But ctime changes a few extra times. For example, it will change if you change the owner or the permissions on the file.
Tensorflow disable verbose logging; set environment variables before running script in Linux
TF_CPP_MIN_LOG_LEVEL=3 python3 tensors.py
does the magic needed
Qutebrowser open in new tab
Inserted the following in config.py
:
config.bind('a', 'set-cmd-text -s :open -t')
, to make a
an alias for O
Linux find parents of a process
This is really really neat when running shell scripts that run other shell scripts etc.
ps fax
gives a nice tree. Can be combined with other stuff, so ps faux
also works.
TODO actually read through the man pages about this.