Command line tools: Difference between revisions

From Jan's Wiki
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 23: Line 23:
**copy to clipboard '''ctrl-w'''
**copy to clipboard '''ctrl-w'''
**paste from clipboard '''ctrl-b ='''
**paste from clipboard '''ctrl-b ='''
* open tmux sessions in seperate windows (iTerm)
  tmux -CC


== Configuration ==
== Configuration ==
Line 32: Line 35:
* Build from git:
* Build from git:
   git-buildpackage -uc -us [https://github.com/zfsonlinux/grub/tree/readme]
   git-buildpackage -uc -us [https://github.com/zfsonlinux/grub/tree/readme]
* Signed built:
  gbp buildpackage -k7EC5B966 --git-sign-tags --git-retag --git-tag
* Make sure to clean your directory (e.g. you used dpkg-buildpackage before)
  rm .gitignore; git clean -f -d; git reset --hard
* For patches use git-dpm [http://git-dpm.alioth.debian.org/examples.html]
* Install build dependencies
* Install build dependencies
   apt-get build-dep package-name
   apt-get build-dep package-name
* Override a package file with a local file (original file is moved file.distrib)
  dpkg-divert --local --rename --add /usr/sbin/grub-probe
* Force IPv4 for apt-get [https://unix.stackexchange.com/questions/9940/convince-apt-get-not-to-use-ipv6-method]
  apt-get -o Acquire::ForceIPv4=true update
* Find files not in package [https://unix.stackexchange.com/a/256334/235563]
(  export LC_ALL=C;  comm -23 <(find /etc/init -xdev -type f | sort)            <(sort -u /var/lib/dpkg/info/*.list); )


== Postfix ==
== Postfix ==

Latest revision as of 08:47, 30 September 2020

  • st - simple statistics from the command line interface [1]
  • pk - A field extraction utility [2]
  • z - jump around directories [3]
  • kpartx - setup partitions in full disk image via loop, so they can be mounted [4]
  • xmount - disk image conversion (VMware, RAW, virtualbox etc.) [5]
  • qemu-img - qemu-img convert -O vmdk imagefile.dd vmdkname.vmdk [6]
  • jacksum - use CRC64 to check if file contains only zeroes [7]
  find . -type f -not -size 0 -print0 | xargs -0 java -jar ~/Documents/src/jacksum-1.7.0/jacksum.jar -a crc64 | grep ^0000000000000000
  • rmate - execute textmate via SSH [8]
  • vimdiff - as git mergetool vimdiff

Shell Stuff[edit | edit source]

  • zsh - Z Shell
  • oh my zsh - A community-driven framework for managing your zsh configuration [9]

TMux[edit | edit source]

  • copy from buffer
    • go to buffer history with ctrl-b [
    • begin selection with ctrl-space
    • copy to clipboard ctrl-w
    • paste from clipboard ctrl-b =
  • open tmux sessions in seperate windows (iTerm)
 tmux -CC

Configuration[edit | edit source]

  • etckeeper - keep track of your etc settings in a git [10]

Ubuntu Packaging[edit | edit source]

  • Debug build:
   export DEB_BUILD_OPTIONS=nostrip,noopt [11]
  • Build from git:
  git-buildpackage -uc -us [12]
  • Signed built:
 gbp buildpackage -k7EC5B966 --git-sign-tags --git-retag --git-tag
  • Make sure to clean your directory (e.g. you used dpkg-buildpackage before)
 rm .gitignore; git clean -f -d; git reset --hard
  • For patches use git-dpm [13]
  • Install build dependencies
  apt-get build-dep package-name
  • Override a package file with a local file (original file is moved file.distrib)
 dpkg-divert --local --rename --add /usr/sbin/grub-probe
  • Force IPv4 for apt-get [14]
 apt-get -o Acquire::ForceIPv4=true update
  • Find files not in package [15]
(   export LC_ALL=C;   comm -23 <(find /etc/init -xdev -type f | sort)            <(sort -u /var/lib/dpkg/info/*.list); )

Postfix[edit | edit source]

  • checking the mail queue:
  mailq
  postcat -q <queueid>
  To Delete:  postsuper -d <queueid>