brew install rename
to install
rename "s/SEARCH/REPLACE/g" *
This will replace the string SEARCH
with REPLACE
in every file (that is, *
). The /g
means global, so if you had a SEARCH_SEARCH.jpg
, it would be renamed REPLACE_REPLACE.jpg
. If you didn't have /g
, it would have only done substitution once, and thus now named REPLACE_SEARCH.jpg
. If you want case-insensitive, add /i
(that would be, /gi
or /ig
at the end).
tmutil listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
Wait until it's done deleting the local snapshots. Restart your computer and it will create a new local snapshot.
Alternatively:
tmutil listlocalsnapshots /
and with
Remove sections of a string, filtering out all that contain "RT"
cat tweets.json | jq '.[].text | select(contains("RT") | not)'
$ cd /usr/local/bin
$ sudo nano [scriptname]
#!/bin/bash
command goes here
exit and save
sudo chmod +x [scriptname]
to make executable
4 April 2021
Gavin Gamboa
@gavcloud
We will be diving into the Tiddlywiki framework (TW), which is an open-source tool great for compiling notes, research, bookmarking, and making non-linear and personalized knowledge maps. In my case I used it to build a virtual portfolio and bookcase for logging my reading notes and keeping track of my projects.
yt-dlp --list-subs [video url]
yt-dlp --skip-download --write-sub --write-auto-sub --sub-lang "en.*" [video url]
`videogrep -i path/to/file --ngrams 1
exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.
Disk Utility is unable to repair this at first, but the fix is this:
- Use
diskutil list
to find the right drive id. - You want the id under the IDENTIFIER column, it should look like
disk1s1
- Run
sudo fsck_exfat -d <id from above>
. egsudo fsck_exfat -d disk1s3
-d
is debug so you'll see all your files output as they're processed.- Answer
YES
if it gives you the promptMain boot region needs to be updated. Yes/No?
find ~ -type f -name "activate" -exec egrep -l nondestructive /dev/null {} \; 2>/dev/null
alternative (more broad):
find ~ -d -name "site-packages" 2>/dev/null