Nov 18
We use dladm to see which interfaces are up:
# dladm show-link
LINK CLASS MTU STATE OVER
bnx0 phys 1500 up --
bnx1 phys 1500 up --
bnx2 phys 1500 up --
bnx3 phys 1500 up --
bnx4 phys 1500 down --
Then we want to make bond with 2 of the interfaces:
# ifconfig bnx2 unplumb
# dladm create-aggr -d bnx2 -d bnx3 0
# ifconfig aggr0 plumb
Its up and running:
# dladm show-link aggr0
LINK CLASS MTU STATE OVER
aggr0 aggr 1500 up bnx2 bnx3
Now we give it an IP address:
# ifconfig aggr0 10.0.2.1 netmask 255.255.255.0 up
Aug 28
Some useful commands to remember:
Find
Find files older than 2 days:
[root@sirius ~]# find /home/ -mtime +2
Find files created in last 2 days:
[root@sirius ~]# find /home/ -mtime -2
Find and destroy files which doesn’t have gid in /etc/group
[root@sirius ~]# find / -nogroup -exec rm -f {} \;
Cut
Get third character from string:
[root@sirius ~]# grep -i ftp /etc/passwd |cut -c3
Sed
Print lines 10-30:
[root@sirius ~]# sed -n '10,30p;30q' current.txt
print line 15:
[root@sirius ~]# sed -n '15p;15q' current.txt
Mar 25
I tested little bit of coding with php at the weekend. It is HEX index which is read from mysql database and generated on the fly.
