Skip to content

marvolo3d/dotfiles

Repository files navigation

these files start with a •

something something dotfiles (linux and osx)


• contents •

general

  • zsh and oh-my-zsh config
  • atom config
  • Maya.env and maya startup script userSetup.py
  • houdini.env
  • sync.sh to sync all dotfiles (incomplete)

osx

  • iterm2 config

linux

  • no penguin specifics yet

• useful dotfile setup links •


• notes2me •

  • add a command reference for commonly used but often forgotten commands
    • this is wip - will split out of README into separate files
    • add git command reference
  • tmux
  • write sync.sh for quick setup
  • add commonly used shell scripts
    • wacom (linux)
    • screencap (linux)
  • investigate storing some of maya, houdini, nuke, and mari configs
    • and possibly zbrush for osx

• command reference •

  • all commands should work on both linux and osx unless noted otherwise
  • will update some of this with zsh goodies sometime

string manipulation - search and replace

  • search and replace words in file(s)
    sed -i 's/string_to_find/replacement_string/g' *.py
    sed -i 's/string_to_find/replacement_string/g' <filename>
  • recursively find names of files containing string
    grep -rl "string_to_find" .
    grep -rl "string_to_find" <path>
  • recursively find files containing string and replace
    grep -rl "string_to_find" <path> | xargs sed -i 's/string_to_find/replacement_string/g'

btrfs

  • use compsize to get individual file/dir sizes sudo compsize /home
  • sudo btrfs fi usage <mountpoint> to get total btrfs filesystem usage at mountpoint

file management

  • recursively find and delete all files with <substring> in their name
    find . -name "*<substring>*" -delete
    find <path> -name "*<substring>*" -delete
  • recursively find and delete all folders with in their name
    find . -name "*<substring>*" | xargs rm -r
    find <path> -name "*<substring>*" | xargs rm -r
  • copy files over ssh using scp
    • copy from a remote host to local: scp user@remotehost:/path/to/file /path/to/local/dir
    • copy from local to a remote host: scp /path/to/local/file user@remotehost:/path/to/dir
    • -r flag to copy dirs, just like regular cp
  • operate on all files recursively (any command)
    • something like find /path/to/find <options> -exec <command>??
      • not certain of exact exec syntax
  • zmv for batch renaming
    • change extension: zmv '(*).tex' '$1.exr'
    • can alias noglob version for no quotes alias mmv='noglob zmv -W'

disk management

  • find size of directory: du -sh <dirname>
  • btrfs file system size: sudo btrfs fi usage <mount-point>

permission management - chmod and chown

  • recursively chmod all directories: find /path/to/find -type f -exec chmod 755 {} +
  • recursively chmod all files: find /path/to/find -type f -exec chmod 644 {} +
  • change owner and group of file or directory: chown newUser:newGroup <target>

nfs exports

  • nfs exports live in /etc/exports
  • update exports with exportfs -ra
  • macos mount linux nfs share: nfs://hostname:sharename

• other useful references, cheatsheets and resources •

markdown
python
zsh