Last active
May 25, 2021 14:09
-
-
Save theodric/44e41a2433a13a4494abe53d8129a484 to your computer and use it in GitHub Desktop.
Commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find and tar up a bunch of shit matching a name (good for copying Mac config files to a new system) | |
find ./ -iname '*bettersnaptool*' | tar cpvf snappage.tar -T - | |
Recursively find and delete a bunch of shit: | |
find ./ -iname '*appstore*' | xargs rm -rfv | |
"Uninstall" a tarball you just installed, provided that you run that command from the same directory as you ran the unpack command, and that you didn’t overwrite any existing files at unpack: | |
tar -tf filename.tar | xargs rm -rfv | |
Grab a bunch of links from a web page: | |
lynx -dump -hiddenlinks=listonly https://www.computerhistory.org/collections/catalog/102661095 | grep pdf | awk '{print $2}' > pdfs | |
Scriptily uninstall a bunch of stuff from an Android device: | |
Building up on banshee's one liner, for me there was a trailing \r, removing it was needed, as such: | |
adb shell 'pm list packages -f' | sed -e 's/.*=//' | sed 's/\r//g' | sort | |
Only then I was able to do get the following to work: | |
adb shell 'pm list packages -f' | sed -e 's/.*=//' | sed 's/\r//g' | grep "com.foobar" | while read pkg; do adb uninstall $pkg; done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment