Browse Source

[nb] Edit: cli_commands.md

master
rdrew 1 week ago
parent
commit
9c73f0ce41
  1. 61
      cli_commands.md

61
cli_commands.md

@ -1,6 +1,7 @@
# CLI Cheatsheet # CLI Cheatsheet
## Contents ## Contents
- [Drupal / Drush](#drupal--drush) - [Drupal / Drush](#drupal--drush)
- [Text Processing](#text-processing) - [Text Processing](#text-processing)
- [Torrents](#torrents) - [Torrents](#torrents)
@ -43,8 +44,7 @@
# Rename files matching a pattern, verbose output shows what changed # Rename files matching a pattern, verbose output shows what changed
rename 's/livero/lives/g' **/*.* -v rename 's/livero/lives/g' **/*.* -v
<<<<<<< HEAD ## <<<<<<< HEAD
---
## Torrents ## Torrents
@ -124,37 +124,48 @@
--audio-channels 1 \ --audio-channels 1 \
--output-dir "/data/split" --output-dir "/data/split"
-vv -vv
=======
```
ffmpeg -i Chaos.m4b -map 0:a -f segment -segment_times $(ffprobe -i Chaos.m4b -show_chapters -loglevel error | grep end_time | cut -d= -f2 | tr '\n' ',' | sed 's/,$//') -c:a libmp3lame -q:a 2 chapter_%03d.mp3
```
# check current dpi # check current dpi
for f in *.pdf *.PDF; do
echo "=== Images in: $f ===" for f in _.pdf_.PDF; do
echo "=== Images in: $f ==="
pdfimages -list "$f" pdfimages -list "$f"
echo "" echo ""
done done
# Creates (or overwrites) images_list.txt in the current directory # Creates (or overwrites) images_list.txt in the current directory
for f in *.pdf *.PDF; do
if [ -f "$f" ]; then for f in _.pdf_.PDF; do
echo "=== Images in: $f ===" >> images_list.txt if [ -f "$f" ]; then
pdfimages -list "$f" >> images_list.txt echo "=== Images in: $f ===" >> images_list.txt
echo "" >> images_list.txt pdfimages -list "$f" >> images_list.txt
fi echo "" >> images_list.txt
fi
done done
# scan for ccitt encoding # scan for ccitt encoding
for f in *.pdf *.PDF; do
[ -f "$f" ] || continue for f in _.pdf_.PDF; do
if pdfimages -list "$f" 2>/dev/null | grep -q " ccitt "; then [ -f "$f" ] || continue
if pdfimages -list "$f" 2>/dev/null | grep -q " ccitt "; then
echo "$f uses CCITT" echo "$f uses CCITT"
fi fi
done done
# Large file transfer to gdrive # Large file transfer to gdrive
rclone copy file_location file_destination \ rclone copy file_location file_destination \
--progress \ --progress \
--transfers 4 \ --transfers 4 \
--checkers 8 \ --checkers 8 \
--retries 10 \ --retries 10 \
--low-level-retries 20 \ --low-level-retries 20 \
--drive-chunk-size 64M \ --drive-chunk-size 64M \
--log-file rclone.log \ --log-file rclone.log \
--log-level INFO --log-level INFO
>>>>>>> f99d1ed ([nb] Edit: cli_commands.md)
> > > > > > > f99d1ed ([nb] Edit: cli_commands.md)

Loading…
Cancel
Save