Skip to content

Useful commands

ssh

You can reach host B using host A as a jump proxy using this command:

$ ssh user_B@host_B -j user_A@host_A
Host A
    HostName host_A
    User user_A
    ProxyJump user_B@host_B

See this askubuntu page

*NIX

List locally installed packages:

$ dpkg --get-selections | grep -v deinstall

List files that do not contain a pattern:

$ grep -rL PATTERN DIRECTORY

Real life usage:

$ grep -rL "CMAKE_PORT" ../Filters/src/lib/gui/ | grep cpp | xargs fgrep .moc -l

List files that contains a missing ref in *.o files:

$ nm -Clo --undefined-only *.o | grep intrusive_ptr_add_ref | grep Gocad::Color

Fun with terminal:

$ echo "SKaaS is \nBatch Only" | figlet | cowsay -n | lolcat

Useful make args:

  • -j x: run make in // using x cores
  • -k: don't stop on errors

svn

Edit a log commit afterward:

$ svn propedit -r N --revprop svn:log'''

List commit from a user in Subversion:

$ svn log | sed -n '/blankman/,/-----$/ p'