/tmp/input:
192.168.1.100
192.168.1.19
192.168.1.102
192.168.2.1
192.168.0.2
# sort -t . -k 3,3n -k 4,4n /tmp/input
-t . : Set field to . (dot) as our IPs separated by dot symbol
-n : Makes the program sort according to numerical value
-k opts: Sort data / fields using the given column number. For example, the option -k 2 made the program sort using the second column of data. The option -k 3,3n -k 4,4n sorts each column. First it will sort 3rd column and then 4th column.
Output:
192.168.0.2
192.168.1.19
192.168.1.100
192.168.1.102
192.168.2.1
Referência
sexta-feira, 19 de setembro de 2008
quarta-feira, 10 de setembro de 2008
Summer 2008
# cat << EOF > /usr/share/zoneinfo/Brazil/summer2008.zic
Rule Brazil 2008 only - Oct 19 00:00 1 S
Rule Brazil 2009 only - Feb 15 00:00 0 -
Zone Brazil/East -3:00 Brazil BR%sT
EOF
# zic /usr/share/zoneinfo/Brazil/summer2008.zic
# cat /etc/localtime > /etc/localtime.copy && \
ln -s /usr/share/zoneinfo/Brazil/East /etc/localtime
Rule Brazil 2008 only - Oct 19 00:00 1 S
Rule Brazil 2009 only - Feb 15 00:00 0 -
Zone Brazil/East -3:00 Brazil BR%sT
EOF
# zic /usr/share/zoneinfo/Brazil/summer2008.zic
# cat /etc/localtime > /etc/localtime.copy && \
ln -s /usr/share/zoneinfo/Brazil/East /etc/localtime
XFS
# mkfs.xfs -d agcount=4 -l size=32m /dev/[DEVICE]
Mount options: noatime,nodiratime,logbufs=8
Check fragmentation factor:
# xfs_db -r /dev/[DEVICE]
# xfs_db> frag & hit enter
If you need to defrag your hard drive:
# xfs_fsr -v /dev/[DEVICE]
Mount options: noatime,nodiratime,logbufs=8
Check fragmentation factor:
# xfs_db -r /dev/[DEVICE]
# xfs_db> frag & hit enter
If you need to defrag your hard drive:
# xfs_fsr -v /dev/[DEVICE]
terça-feira, 2 de setembro de 2008
ext3 tuning
1) Directory indexing
# tune2fs -O dir_index /dev/hdXY
# e2fsck -D /dev/hdXY
2) Journal mode
# tune2fs -O has_journal -o journal_data /dev/hdXY
3) Mount options
# mount -o nodiratime,noatime,data=journal /dev/hdXY /your_mount_point
Referências:
Advanced filesystem implementor's guide, Part 8
Ext3 tuning
# tune2fs -O dir_index /dev/hdXY
# e2fsck -D /dev/hdXY
2) Journal mode
# tune2fs -O has_journal -o journal_data /dev/hdXY
3) Mount options
# mount -o nodiratime,noatime,data=journal /dev/hdXY /your_mount_point
Referências:
Advanced filesystem implementor's guide, Part 8
Ext3 tuning
quinta-feira, 21 de agosto de 2008
RHEL/CentOS Extra Packages Repository
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
Referência: http://www.cyberciti.biz/faq/rhel-fedora-centos-linux-enable-epel-repo/
Referência: http://www.cyberciti.biz/faq/rhel-fedora-centos-linux-enable-epel-repo/
sábado, 16 de agosto de 2008
terça-feira, 29 de julho de 2008
How to flash BIOS
wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
gunzip FDOEM.144.gz
mount -t vfat -o loop FDOEM.144 /mnt/temp
cp 1400_A09.EXE /mnt/temp (Dell Vostro 1400 BIOS A.09)
umount /mnt/temp
mkisofs -o bootable_freedos.iso -b FDOEM.144 FDOEM.144
cdrecord -v dev=0,0,0 speed=4 -eject bootable_freedos.iso
gunzip FDOEM.144.gz
mount -t vfat -o loop FDOEM.144 /mnt/temp
cp 1400_A09.EXE /mnt/temp (Dell Vostro 1400 BIOS A.09)
umount /mnt/temp
mkisofs -o bootable_freedos.iso -b FDOEM.144 FDOEM.144
cdrecord -v dev=0,0,0 speed=4 -eject bootable_freedos.iso
Assinar:
Postagens (Atom)
Drunk Penguins
Drunk Penguins