Archive for the ‘*nix-tools’ Category
Posted by jpluimers on 2016/06/16
Since quite a few commands that you regularly see mentioned on the web have been removed from OpenSuSE net-tools, I’ve created a few bash aliases in /etc/bash.bashrc.local below.
Note the original commands are not good have been deprecated for years on various distros and therefore removed:
# stuff removed from net-tools
# see https://features.opensuse.org/317197 and https://build.opensuse.org/package/view_file/network:utilities/net-tools/net-tools.changes
## Because of changes on Thu Apr 10 12:33:41 UTC 2014
alias "arp=echo 'use \"ip neigh\" or \"ip -r neight\"' && ip neigh"
alias "ifconfig=echo 'use \"ip a\"' && ip a"
alias "netstat= echo 'use \"ss\" or \"ss -r\"' && ss"
alias "route=echo 'use \"ip r\"' && ip r"
## Because of changes on Sun Mar 29 00:41:21 UTC 2015
alias "ipmaddr=echo 'use \"ip maddr\"' && ip maddr"
alias "iptunnel=echo 'use \"ip tunnel\"' && ip tunnel"
Some bits of the net-tools change-log:
-------------------------------------------------------------------
Sun Mar 29 00:41:21 UTC 2015 - jengelh@inai.de
- ipmaddr and iptunnel are obsolete too, move them to subpackage.
(Superseded by `ip maddr` and `ip tunnel`)
- remove redundant %clean section
-------------------------------------------------------------------
Thu Apr 10 12:33:41 UTC 2014 - mmarek@suse.cz
- Move arp, ifconfig, netstat and route to a -deprecated subpackage
(fate#317196, fate#317197)
- Drop the rarp tool, which has been broken since kernel 2.3
Note that the -lntu parameter seems to be the same for both ss and netstat: [WayBack] Get a list of Open Ports in Linux – Super User
–jeroen
via File net-tools.changes of Package net-tools – openSUSE Build Service.
Posted in *nix, *nix-tools, bash, bash, Development, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2016/06/01
I needed to find the symlinks in /etc pointing to directories and know both the name and place they point to.
revue:~ # ls -al `find -L /etc/ -xtype l -type d`
find: ‘/etc/ssh/broken/ssh_host_dsa_key’: Too many levels of symbolic links
find: ‘/etc/ssh/broken/ssh_host_ecdsa_key’: Too many levels of symbolic links
find: ‘/etc/ssh/broken/ssh_host_key’: Too many levels of symbolic links
find: ‘/etc/ssh/ssh_host_ecdsa_key’: Too many levels of symbolic links
find: ‘/etc/ssh/ssh_host_dsa_key’: Too many levels of symbolic links
find: ‘/etc/ssh/ssh_host_key’: Too many levels of symbolic links
lrwxrwxrwx 1 root root 19 May 7 15:43 /etc/apparmor.d/cache -> /var/cache/apparmor
lrwxrwxrwx 1 root root 6 Sep 28 2014 /etc/rc.d -> init.d
lrwxrwxrwx 1 root root 26 May 23 13:50 /etc/squid/errors -> /usr/share/squid/errors/de
lrwxrwxrwx 1 root root 28 Mar 25 22:07 /etc/ssl/certs -> /var/lib/ca-certificates/pem
lrwxrwxrwx 1 root root 18 Apr 30 14:20 /etc/xdg/systemd/user -> ../../systemd/user
–jeroen
via: bash – How do I find all of the symlinks in a directory tree? – Stack Overflow.
Posted in *nix, *nix-tools, bash, bash, Development, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2016/04/11
Manually you can do it like this: How To Use Git to Manage your User Configuration Files on a Linux VPS | DigitalOcean.
But there is also etckeeper. There is even a set of manual installation steps for opensuse: backup – etckeeper for opensuse – bash script install and configure – Unix & Linux Stack Exchange.
Three important etckeeper gotchas with powerful scripts like pre-commit /etc/etckeeper/pre-commit.d:
- Ensure you give them executable permissions like chmod 755.
- Ensure they are valid sh scripts.
- Do not give them the .sh extension:
- fails:
/etc/etckeeper/pre-commit.d/10rsync-var-lib-named-master
- works:
/etc/etckeeper/pre-commit.d/10rsync-var-lib-named-master.sh
–jeroen
via:
Posted in *nix, *nix-tools, etckeeper, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2016/03/21
Simple steps to Capture tmux output – the much less painful way | Rico’s Tech Memo
Note the last line under 8) is a literal command: type it as such and it will save to that file.
–jeroen
Posted in *nix, *nix-tools, Power User, tmux | Leave a Comment »
Posted by jpluimers on 2016/03/10
Since ESXi is based on busybox, it is using ash a variation of sh (the classic bourne shell) called Almquist shell and most nxes use some form of bash a lot of things won’t work.
For instance, doesn’t support sh –version.
Luckily there are uname -mrs and (more elaborate) vmware -vl to get the version.
Note there is support busybox aliases so alias dir=”ls -laF” works, and you can define aliases for the version information too.
–jeroen
via:
Posted in *nix, *nix-tools, bash, Linux, Power User, SuSE Linux, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2016/03/07
Last friday I updated the examples at *nix networking – lsof: How to tell what process has a specific port open on Linux (via: Server Fault) as I needed to document some of the machines around here (so it becomes easier replacing them).
I also added some links to background information and (when I get to using it: OS X still goes without) a good iproute2 starter page.
–jeroen
Posted in *nix, *nix-tools, Apple, Communications Development, Cygwin, Development, Internet protocol suite, Linux, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.6 Snow Leopard, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, TCP | Leave a Comment »
Posted by jpluimers on 2016/02/22
If for instance your Boxee gets old or breaks down, you can use a Raspberry Pi as a replacement with Kodi as media player.
This combination will understand the Video+USB over HDMI which most TV supports officially named HDMI-CEC , but most vendors “invented” their own names (see list below).
The core is the kodi support for CEC.
Basically it comes down to using three cables going to the Pi: Power from TV (or some other source), HDMI to TV, and wired Ethernet. And a distribution for RaspberryPi containing kodi will work, for instance from OpenELEC Mediacenter – Download: Raspberry Pi Builds
Chad MILLER has more details on how to get this to work: My Boxee box is getting old, but I knew of no replacements. The problem is I …
Names known for HDMI-CEC via Wikipedia:
Anynet+ (Samsung), Aquos Link (Sharp), BRAVIA Link and BRAVIA Sync (Sony), HDMI-CEC (Hitachi), E-link (AOC), Kuro Link (Pioneer), INlink (Insignia), CE-Link and Regza Link (Toshiba), RIHD (Remote Interactive over HDMI) (Onkyo), RuncoLink (Runco International), SimpLink (LG), T-Link (ITT), HDAVI Control, EZ-Sync, VIERA Link (Panasonic), EasyLink (Philips), and NetCommand for HDMI (Mitsubishi).
Because of the naming, turning on CEC can be confusing: How to Enable HDMI-CEC on Your TV, and Why You Should
–jeroen
Posted in *nix, *nix-tools, Development, Hardware Development, Hardware Interfacing, HDMI, Linux, Power User, Raspberry Pi | Leave a Comment »
Posted by jpluimers on 2016/01/27
Even after the SpeedTouch password algorithms were disclosed 2008, ISPs keep using weak algorithms to generate their default WPA/WPA2 passwords in their routers:
A short while ago, blasty published code to generate the WPA2 passwords for UPC routers. Even though Ziggo now owns UPC, a lot of this UPC equipment is still in use. I guess it won’t be for long that similar code for Ziggo routers will be published too.
The code at https://haxx.in/upc_keys.c is easy to download, build and run on a Mac OS X machine even when you don’t have Xcode installed (use the “xcode-select –install” trick):
wget https://haxx.in/upc_keys.c
gcc -O2 -o upc_keys upc_keys.c -lcrypto
./upc_keys UPC0053284 5
./upc_keys UPC0053284 24
–jeroen
Posted in *nix, *nix-tools, Apple, C, Development, gcc, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, Power User, Software Development | Leave a Comment »