Difference between revisions of "CLI"
From Fiamma
Jump to navigationJump to searchLine 12: | Line 12: | ||
i3lock -c 000000 & xset dpms force off | i3lock -c 000000 & xset dpms force off | ||
</pre> | </pre> | ||
+ | |||
+ | === Pull multiple files from Android via ADB using wildcards=== | ||
+ | Annoyingly the output of the adb shell ls command includes line-feed control characters that you can remove using tr -d '\r'. | ||
+ | |||
+ | Examples: | ||
+ | |||
+ | <pre>adb shell 'ls sdcard/gps*.trace' | tr -d '\r' | xargs -n1 adb pull | ||
+ | adb shell 'ls /sdcard/*.txt' | tr -d '\r' | sed -e 's/^\///' | xargs -n1 adb pull</pre> | ||
== Programs == | == Programs == |
Revision as of 08:17, 13 October 2017
Various bash/zsh/CLI tips.
Contents
Commands
Execute any line // echo any line from a textfile.
Source: https://www.reddit.com/r/archlinux/comments/6k7go4/how_could_i_excecute_specific_commands_from_a/
sed -n 1p file.txt | bash
Turn screen off
https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling
i3lock -c 000000 & xset dpms force off
Pull multiple files from Android via ADB using wildcards
Annoyingly the output of the adb shell ls command includes line-feed control characters that you can remove using tr -d '\r'.
Examples:
adb shell 'ls sdcard/gps*.trace' | tr -d '\r' | xargs -n1 adb pull adb shell 'ls /sdcard/*.txt' | tr -d '\r' | sed -e 's/^\///' | xargs -n1 adb pull
Programs
writepid /etc/openvpn/mv.pid
for OpenVPN and i3bar
Network-manager replacement in Arch
nmtui
Pacman-wrapper for downloading faster
powerpill [1] (seems a bit like axel and apt-fast)
Resources
See also Category:CLI