Notes tagged with "Linux"

file permissions

A note on file permissions.

vim stuff

Things in vim that I can never remember….


:arg **/*.py
:argdo %s/pattern/replace/gce
:argdo update

tmux stuff

N.B. I always reset the tmux command option from ctrl + b to ctrl + a.

Sessions

  • List all tmux sessions: tmux ls or ctrl + a s:
... tmux ls
... 0: 4 windows (created Sat Nov 23 08:44:49 2019) [158x78] (attached)

Windows

  • New Window: ctrl + a n

  • Switch/select window: ctrl + a 0...9

  • Move window: ctrl + a : and :swap-window -t [window-number|+/-move-positions] Swap window: ctrl + a : and :swap-window -s [window-number] -t [window-number]

Linux and My Apple SuperDrive

I have an Apple SuperDrive 2 that would not work on Linux Mint 19. The drive was visible when it plugged it, but would not accept disks. Fortunately I found this article with instruction on how to wake up Apple’s drive and start working.

Here’s the basics:

  1. Install sg3-utils:

    ... sudo apt-get install sg3-utils
    
  2. Find the device id (likely sr0 or sr1). Mine was sr0:

    ... ls -al /dev | grep sr
    lrwxrwxrwx   1 root root           3 Nov 10 11:46 cdrom -> sr0
    lrwxrwxrwx   1 root root           3 Nov 10 11:46 cdrw -> sr0
    lrwxrwxrwx   1 root root           3 Nov 10 11:46 dvd -> sr0
    lrwxrwxrwx   1 root root           3 Nov 10 11:46 dvdrw -> sr0
    brw-rw----+  1 root cdrom    11,   0 Nov 10 11:46 sr0
    
  3. Wake the drive up: