Common Linux/Unix development auxiliary commands: assorted Linux/Unix Commands
Highlights of many fragmented commands:
1. How to download ftp files through commands
Read-s-p "Your passwd:" Passwd; wget -- user = YourUserName -- password = $ Passwd ftp: // IP/dir/file
Read-s-p "Your passwd:" Passwd; axel ftp: // yourUserName: $ Passwd @ IPaddr/dir/file
2. How to download samba files through commands
Smbclient // IP/file -- user = domain \ user-c "cd \ dir; get file"
Download all files:
Smbclient // IP/file -- user = domain \ user-c "prompt OFF; recurse ON; cd \ remotedir \ dir; LCD '/local/dir'; mget *"
3. ldapsearch AD data retrieval:
Ldapsearch-x-D administrator @ domain-w passwd-h domain-B "CN = container,..., DC = domain"-s sub "(objectclass = *)"
4. Common rpm commands
Check which files are contained in. rpm:
Rpm-qlp pkg. rpm
Check which files are contained in an installed software:
Rpm-ql pkg
Check which software package a file comes from:
Rpm-qf/bin/ps
Decompress the package to obtain all files in. rpm:
Rpm2cpio myrpmfile. rpm | cpio-idmv
Check the related (installation, uninstall) scripts of a software.
Rpm -- scripts-qp pkg
4. Common Software commands for other systems:
Dpkg-c
Gunzip ahoo.gz
Swinstall-s/path/to/ahoo. depot \*
Sh PHCO_ahoo
Pkgadd-d ahoo. local
Pkginfo
Pkgchk
Pkgtrans openssl-0.9.8d-sol8-sparc-local.
Installp-d ahoo. bff all
Hpux arch: file/stand/vmunix
5. mount
Mount-vcdrfs-oro/dev/cd0/cdrom/
Solaris: mount-o vers = 3
Mount-o loop disk1.iso/mnt/disk
Aix: nfso-po nfs_use_reserved_ports = 1
6. Check the built-in libpath of the program:
Hpux-chrecognition
Dump-Hv
Sunos elfdump-d
Linux readelf-d
7. Others:
Iptables-a output-d 202.-j DROP
Ps eww pid | cat/proc/pid/env
Smitty chtz_date
Eeprom boot-device = "/pci @ 1c, 600000/scsi @ 2/disk @ 2, 0: a/pci @ 1c, 600000/scsi @ 2/disk @ 1, 0:"
Fsck-y/dev/md/dsk/d7
Fuser/file_used_by_process
Inetadm-m/-l
Svcadm refresh
Diff-Nurp old new> patch
Set follow-fork-mode child
Sudo/usr/sbin/ntpdate 3.asia.pool.ntp.org
Tcpdump-nnvvSX dst 192.168.96.83-w capter.txt
Tcpdump-r-X capter.txt
Addr2line-e a. out 0 xabc
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.