Mirror Disk Solaris
metastat
Debugging
Trace doing of given command ( useful debugging )
truss executable
Using multiple windows, this can be used to trace setuid/setgid programs
truss -f -p
Arp, ethernet trouble shooting
Shows the ethernet address arp table
arp -a .
Delete a stale ethernet entry for host myhost
arp -d myhost
Disk Commands
Reports disk space used in Kilobytes
du -k .
Reports only total disk space used in Kilobytes
du -sk .
Tells you how big the /var files are in reverse order
du -ad /var | sort -nr
Format diskette
fdformat -d -U
Command to display drives statistics
/usr/bin/iostat -E
Mount an ISO 9660 CDROM
/bin/mount -F hsfs -o ro /dev/sr0 /cdrom
Disk geometry and partitioning info
prtvtoc /dev/rdsk/c0t0d0s2
How much space is used by users in kilobytes
quot -af
Driver Parameters
Shows IP variables in the kernel
ndd /dev/ip \?
Tells you if forwarding is on (=1)
ndd /dev/ip ip_forwarding
Enables IP forwarding between interfaces
ndd -set /dev/ip ip_forwarding 1
File Manipulation
Converts DOS file formats to Unix
dos2unix | -ascii
Split files into pieces
split
Search and Replace text in vi
[vi] : %s/existing/new/g
Set line numbers in vi
[vi] :set nu
Set tab stops in vi
[vi] :set ts=[num]
File System
Zero's out the file without breaking pipe
cat /dev/null > filename
Make a mirror image of your boot disk
dd if=/dev/rdsk/... of=/dev/rdsk/... bs=4096
Unmount all file systems in disk group dg
df -k | grep dg| awk '{print $6}' |xargs -n 1 umount
Check a UFS filesystem on c0t0d0s0
fsck -F ufs /dev/rdsk/c0t0d0s0
Check answering yes to all questions
fsck -F ufs -y /dev/rdsk/c0t0d0s0
Check using an alternate super block
fsck -F ufs -o b=97472 /dev/rdsk/c0t0d0s0
Unpack .tar.gz files in place
gzip -dc file1.tar.gz | tar xf -
Creating hard links and soft links
ln [-fhns]
0 Response to Lista de Commandos de Solaris por categorias
Publicar un comentario