My UNIX (Solaris, Linux, BSD, Mac OS X) & Windows Command Line Notes

Unix Commands | Editors | Terminal Customizing | Disk and File Management | NetBackup | Windows | Program Commands
This page was last updated on 10/06/2010. http://www.rich-online.net/notes.htm
See something missing? See errors on the page? Let me know.

The UNIX Section
Command Description OS/Program
Common Commands
cd path
~

-
../
Change working directory
~ or cd takes you to your home directory, but it's not useable in all shells.
- Takes you to last directory you visited
../ Takes you back one directory.
All
ls filename(s)
-l
-t
-r
-ltr
-a
-A
-h
-R
-p
-n

-F
Shows contents of the directory
-l gives nice list layout
-t Puts files in order of time last accessed at the top
-r Puts files in reverse order.
-ltr lists files last accessed at the bottom
-a shows all hidden files
-A shows hidden file, but not . and ..
-h Makes it human readable
-R List contents of subdirectory.
-p Puts a / after directoriries
-n Displays UID and GID instead of username and groupname.
-F Displays file type
All
lsof lsof is a command line utility that stands for "list open files". All
pwd Tells you where you are All
id Tells you who you are. All
cp sourcefile destionfile
-p
Copies file from one place to anther. Can also change name of the destion file when copying. -p Perservers file info. All
touch path/file Creates file All
mv sourcefile destionfile Moves file from one place to anther. This command can also be used to rename a file All
rm file
rm -R directory
rmdir directory

Path:/usr/bin/rm
Path:/usr/bin/rmdir

To remove files and directories
Recursively removes directories and subdirectories
Removes directory
All
mkdir Path
-m
-p

Example:
mkdir /usr/local/nagios

Makes directory
Set mode like chmod
Creates non-existing parent directories first
All
history See your previous issued commands. All
logout logs out of treaminal. All
clear Clears terminal window All
man CMD
-l
Shows you a detailed discription of the command.
* Note: On some systems you must hit [q] to exit the man page.
All
file filename
-l
-c
-w
-m
Displays number of lines, words and characters in a file.
-l Line count
-c Byte count
-w Word count
-m Character count
All
wc filename Tells you what type of file it is. All
lp options filname Command to print to a printer from the CMD All
Viewing Files
more file Displays contents of file. Good for large text files.
Controls
[spacebar] - Moves forward 1 screen
[Return] - Scrolls one line at at a time
[b] - Back one screen
/"string" - Search forward for pattern. [n] finds next occurance of pattern
* Note: On some systems you must hit [q] to exit
All
cat file Displays contents of file. Good for smaller text files
* Note: Do not use with binary files
All
tail filename
-f or -f#
-#
+#
-n
+n
Used for veiwing the tail end of large files.
-f shows file as it's updated. Useful for viewing logs.
- followed by a number, will display last number of lines. If you use -30 for example the terminal will the last 30 line in the file.
All
head filename
-n
Displays 1st 10 lines of a file
-n Change number of lines displayed
All
view filename
-n
Like more, used to view big files All
Editors
vi file

Path: /bin/vi

Command line text editor that comes with every flavor of UNIX. Useful for checking or editing system files. Use the [esc] key to enter command (CMD) mode.
CMD mode commands
[a] append
[i] insert
[:w!] write
[:q!] quit
[:wq!] write and quit
[x] delete
[r] replace
[dd] delete line
[b] <- previous word
[h] <- move tothe left
[j] move down
[k] move up
[i] -> move to the right
[w] -> move to next word to the right.
[D] delete to the right of your location
[.] repeat last command
[yyp] copy line
[cw] changes word. End of word is shown with a $
[set nu] gives line numbers
[set nonu] removes lines
[:/variable] to find item in file. Use [n] to find next
All
gedit file
Path: /usr/sbin/
gedit is the default text Gnome GUI editor for Solaris Gnome solaris
nedit file

nedit is the default text CDE GUI editor for Solaris CDE Solaris
edit file

Path: /usr/bin/edit

edit launchs the default GUI text editor for Mac OS X Mac OS X
Other Non-command, but useful info Shell
\ Use \ before a space. \ basically this means ignore the next space. All
CMD ; CMD Use ; to run another command after the one to the left is finished. If command to the left fails the command after the ; will still run. All
CMD | CMD The | is called a pipe. It is used to pipe output from one command to the next. All
CMD || CMD || - If 1st command fails, do command to the right. It is, do this or do that. All
. Having a . means to do this command in the current working directory. All
.file A dot in front of a file name means that it's a hidden file. All
CMD && CMD Use && to run 2nd command only if the 1st command complets. If the 1st CMD fails the 2nd CMD will not run. It's kind of like an and statment, do this and that. All
CMD & Use & after a command, to make the command run in the backgroud. All
( ) Sub shell All
CMD > file Use this > to send output, of a command, to a file. This is also called a redirect. All
CMD >> file Use this >> to append output, of a command, to the end of anther file. All
CMD 2>/dev/null Use 2>/dev/null at the end of a command to dispose of error or to delete content. All
Terminal Customizing
Command Description OS/Shell
Bash
Path: /bin/bash or /usr/bin/bash
Bash is a popular shell. Type bash in to the terminal to switch to the bash shell. Bash is short for Bourne Again Shell. Bash
korn shell
Path: /bin/ksh
Korn shell is a popular shell. Type ksh in to the terminal to switch to the korn shell. korn
C shell
Path: /bin/csh
C shell is a popular shell. Type csh in to the terminal to switch to the C shell. C shell
Bourne
Path: /bin/sh
Bourne shell is a popular shell. Bourne
tc shell
The tc shell or tcsh tc shell
z shell
The z shell or zsh z shell
export PS1=
\d
\t
\h
\#
\u
\W
\w
This changes your prompt in the terminal. Must add or edit this in the .profile file in your home directory.
\d - current date, \t - current time, \h - hostname, \# - command number, \u - user name, \W - current working directory, \w - current working directory(full path)

Example:
export PS1="\[\e[0;31m\]\u@\[\e[0;32m\h \e[0;34m\]\w>\e[m "

bash, ksh, sh
PATH=path:path: path This give you more search paths. Adding paths helps you not have to type the full path to run commands. Must add or edit this in the .profile file in your home directory. All
Disk and File Management
Command Description OS/Program
df
-k
-h
-F filetype
/directory

Path: /usr/bin/df

Shows system directory size Outputs info in a nice chart.
-h Human readable version of -k

Displays only file format type you specify.
/ Shows where a directory is mounted.

All
du
du -sh *
Path: /usr/bin/du
Shows disk usage.
Shows directory sizes.
All
swap -l
-a Directory
Tells you were the swap file is located on system
Adds space to the swap file on the system
All
mount /dev/hda2 /new/subdir
mount -F nfs remote server: /export/home /local/home
Attaches drives (hard drives, cdrom, floppy) to file system
Mounts NFS to local machine
All
umount /dev/hda2 or /new/subdir
-f
Unmounts file system
-f Forces a unmount
-l Lazy unmount, forces unmount (linux)
All
mt -f tape name Utility for magnetic tape drives. Mounts tape drives. All
Win too!
ln -s Path Path make hard or symbolic links to files All
newfs Constructs a UFS file system All
cfgadm -al
-c unconfigure c[#]
-c configure c[#]
To inspect configuration Solaris 10
devfsadm -C -c device class (disk or tape) Resets special device files.
-C Clears special device files
-c Resets special device files
Solaris 10
Volume Manager Solaris
metastat Displays status for meta devices and hat spares. Useful for RAIDS All
Command Line Screen Capture
Command Description OS/Program
Screencapture file name Use to get command line Screen capture Mac OS X
script file name
-a
Use to get command line Screen capture
-a appends to existing file.
All
System Administration
Command Description OS/Program
su
su username
su - or su username -

Path: /usr/bin/

Assume superuser/root
Assume anther user account
The - argument gives you the environment of the account you assume. You can leave the username blank when assuming root.

Other important su facts
/varadm/sulog --> tracks who is using su

All
sudo
sudo username
-
Example: sudo su -

-i


sudo CMD

sudo shell
Example: sudo bash

Path for Solaris: /usr/local/bin/sudo
Path for Mac OS X: /usr/bin/sudo
Assume root
Assume anther user account
- gives you the environment of the account you assume.

-i after the sudo command gives the user root privileges for a short time. When used in Ubuntu the user is logged out of root, if the terminal has a period of inactivity.

Put sudo in front of a command and it will run with root privileges. After the command finishes the user returns to a non-privileged account.
sudo bash gives you root with a bash shell.

* Note: The user must be in the sudoers file in order to use. This usually done buy adding a group to the file.
Path to sudoer file /etc/sudoers
All
visudo
Path: /usr/local/sbin/
Use ./visudo to edit the sudoers file. All
uname
-a
-n
-s
To see OS type
-a gives all available info
-n gives the systems host name
-s gives you OS type
All
hostname Tells you which computer your on. All
zonename Tells you which zone you are using Solaris 10
ps -ef Use this to see what processes are running on your machine. -e Lists all processes. -f Full list. All
kill -9 process ID/s Use this to kill processes that you no longer wish to run on your machine All
pkill process name Use this to kill programs that you no longer wish to run on your machine All
reboot
-- -r

Path: /usr/sbin/

Reboots system. The -r is for reconfiguration boot, must be used with -- if your logged in remotely. The -- passes the -r option to the boot process. All
crontab
-l
-e

Path for Solaris: /var/cron/crontab
Path for RedHat: /var/spool/cron/

RedHat configation file: /etc/crontab
For script automation
-l to look at entries in crontab
-e to edit contents in crontab. Must be root to use this option.

* Note: if crontab -e doesn't work, us this command.
EDITOR=vi;export EDITOR
* Note: If you edit the crontab with a script you need to restart it manualy. Use these commands to do so.
On RedHat(RHEL)/Fordora/Cent OS
/etc/init.d/crond [start/stop/restart]
On Debian or Ubuntu
/etc/init.d/cron [start/stop/restart]

All
fuser
-c
-k
-f
-u

Path: /usr/sbin/

Use to find out which user is using the file system you need to unmount All
sneep
-s serial number

Path: /usr/sbin/

Gives system serial number as it is stored in NVRAM.
-s can be used to set or input the serial number in NVRAM.
Note - Command works a little differant in solaris 9 then in solaris 10. sneep logs all important changes to syslogd.
Solaris
Compress, Zip, Tar
tar cvf destination source
tar xvf tarfile
Tares files
Untares files
All
uncompress File.Z Uncompress files with an .Z extension. All
compress File compresses files and puts .Z extension at the end. All
gzip File zips files on UNIX All
gunzip File Unzips files on UNIX All
zip File zips files on UNIX All
unzip File Used to unzip files with the .zip extention. All
Services
svcs {process/program} Solaris 10
svcadm {disable / enable} {process/program}
svcadm refresh {process/program}
-r

Examples:
svcadm disable ntp

Path: /usr/sbin

To enable or disable process/program.
<---- restart program
-r starts all dependent services


<---- This disables the NTP client

Solaris 10
svccfg {disable / enable} {process/program}
Path: /usr/sbin
Service Configuration Solaris 10
service {process/program}
Path: /sbin/service
Used to see control services Red Hat
svcprop {disable / enable} {process/program}

Path: /usr/sbin

Used to see properties of services Solaris 10
Package Management
pkgadd pkgname
-d
To add software package
-d To specify director
All
pkgrm pkgname To remove a package All
pkgchk pkgname
-p
-v
Verifies package
-p checks file
-v Lists package contents
All
pkginfo pkgname Tells you what packages are installed on the computer and gives info on the package All
pkgparam pkgname Display package parameter values All
showrev
showrev -p | grep pkgname
Shows packages on system. The 2nd line shows you how to find a certain package. All
User Administration
Command Description OS/Program
passwd username
-f
-u
-N
-l
-s daemon
-r ldap
-e
-w #
-x #

Path: /etc/passwd

Set or change password
-f Forces the user to change password at the next login -u unlocks the account.
-N creates a Non-login account
-l locks the account
-s shows the status of a daemon
-r ldap updates or changes the user's password in LDAP.
-e gives you the ability to change your default shell.
-w sets the warring time, which tells you to reset your password.
-x sets the days till the password expires.

* Note: The passwd command stores the passwords in the /etc/passwd file.

All
useradd username
-d path/username
Adds user to system.
The -d option sets the users home directory.

* Note: The new account will be locked intill you set the password.

All
groupadd gid groupname

Example:
groupadd -g 101 nagios

Adds groups to system
-g Assigns the group id gid for the new group
All
rmuser username Use this command to remove a user. All
chown username filename
chown username:groupname path/filename
Change owner of file All
chmod permissions/options file
-R

Examples:
chmod 777 /home/filename

Changes permissions on files.
Changes Read, Write(modify), Execute permissions
r = read, w = write, x = execute, - = no permisstions
r = 4, w = 2, x = 1, - = 0
7 = rwx, 5 = r-x,
-R changes permissions in subdirectories recursively.
All
chgrp groupname file/directory Changes group ownership All
last username

lastlog

path: /var/log/lastlog

See last time user logged in

Prints contents of lastlog

All
whois Tells you who is logged onto a system. All
who Tells you who is logged onto a system. All
w Tells you who is logged onto a system. Same as who but, has better layout. Has header for each section. Shows server uptime, time, number of users and average load. All
Remote connections
Command Description OS/Program
ssh user@hostname or ssh hostname

ssh -X or -Y hostname
-C



ssh-keygen
ssh-agent bash
ssh-add


Path: /usr/bin/

For logging in securely to remote machine and for executing commands on a remote machine.
-X or -Y lets you locally display X11 programs from a remote machine. -X is better to use then -Y, only use -Y if -X doesn't work.
-C is used to compress the data.

The "ssh-keygen" command generates the public and private key pair used in ssh encryption. The "ssh-agent bash" command starts your ssh agent in the bash shell. The "ssh-add" command adds the ssh keys to your machine. Both "ssh-agent" & "ssh-add" commands are used for key exchange, so you don't need to use your password to login.

Links to more info on setting up key exchange.
http://www.g-loaded.eu/2005/11/10/ssh-with-keys

The ssh configuration file.
/etc/ssh/sshd_config
All
scp Lfile username @hostname: Rdir
scp -r Lfile username@hostname: Rdir

Example:
scp myfile mylogin@myserver:/home
scp mylogin@myserver:/home myfile

Path: /usr/bin/

Securely transfer files between two computers
-r To copy a directory

Links to more info.
http://kb.iu.edu/data/agye.html
http://acs.ucsd.edu/info/scp.shtml

All
rsh or rlogin hostname
Path: /usr/bin/
To login to remote machines.
Security Notice, this is not secure.
All
sftp hostname
Path for UNIX: /usr/bin/
Use to transfer files to and from computers
UNIX & Windows
ftp hostname

Path for UNIX: /usr/bin/

Use to transfer files to and from computers
Security Notice
Transmits username and password in the clear.
UNIX & Windows
telnet hostname

Path for UNIX: /usr/bin/

To login to remote machines. Not secure.
Security Notice
Transmits username and password in the clear.
UNIX & Windows
xhost +
xhost + hostname
Allows connections from remote hosts
Allows connections from single host
All
setenv DISPLAY hostname:0.0 Must use csh
Remote displays back to your location. Functions like ssh -X.
Security Notice, this is not secure.
Must use with xhost +.
Links to more info:
http://www.cyberciti.biz/tips/how-to-export-display-from-linux-to-freebsd.html
All
export DISPLAY hostname:0.0 works with Bash, KSH.
Remote displays back to your location. Functions like ssh -X.
Security Notice, this is not secure.
Must use with xhost +.
Links to more info:
http://www.cyberciti.biz/tips/how-to-export-display-from-linux-to-freebsd.html
All
ZFS
Command Description OS/Program
zpool create -f 'pool name' 'hard disk'
Example: zpool create -f newpool c1t2d0
Makes a ZFS partion called newpool ZFS
zpool status -v To see ZFS status and device names ZFS
zfs create
-o
list
Makes ZFS directory
for options
Much like df -k
ZFS
Zones
Command Description OS/Program
zonename Tells you which zone you are using Solaris 10
zoneadm list -cv List all zones on machine.
status installed ---> needs to be booted
status configured ---> needs to be installed
Solaris
zoneadm -z zonename install
zoneadm -z zonename boot
zoneadm -z zonename halt
zoneadm -z zonename detach
zoneadm -z zonename ready

zoneadm -z zonename reboot
zoneadm -z zonename uninstall [-F]

installs a zone
boots the zone
Halts zone
Detach the specified zone
Prepares a zone for running applications but does not start any user processes in the zone
Restart the zones
Uninstall the specified zone from the system
Solaris
zonecfg -z zonename -f configfile
zonecfg -z zonename delete
zonecfg -z zonename uninstall
Configures zone
Deletes zones
uninstalls zone
Solaris
zlogin -C zonename Used to login to a zone Solaris
Important locations
Important locations Why It's important OS/Program
$HOME/.profile User's profile file used with sh and ksh All
/etc/passwd System's password file.
Can be used to check if user/process has an account on machine.
All
/etc/shadow This where /etc/passwd stores the passwords.

* Note: NP or ! means no password set. LK or * means account is locked. !! means the account is expired. These items will be found in the password section in this file.

All
/etc/profile system-wide profile file used with bash, sh and ksh All
/etc/services Services on server. list of services and port numbers All
/etc/inetd.conf Services on server. All
/usr/local/sbin/visudo Command used to edit the sudoers file. All
/usr/bin/firefox Path to firefox All
/usr/sfw/bin/mozilla
/usr/lib/mozilla/mozilla
Path to mazilla web browser on solaris Solaris
/usr/dt/appconfig/netscape/netscape Path to Netscape All
/etc/issue For the remote login banner All
/etc/release Shows Solaris release version. Solaris
/etc/group Used to define groups All
Networking
/etc/hosts Use to check network addresses All
/etc/hosts.allow Used with ssh All
/etc/resolv.conf Mostly used for DNS. Useful for LDAP as well All
/etc/nsswitch.conf Tells server where to look 1st for name server/LDAP All
Logs
/var/log/daemonlog System messages All
/var/adm/message System messages Solaris 10
/var/log/message System messages Linux
/usr/sbin/audit All
/usr/sbin/logadm All
/etc/security/audit_log.sh All
/var/log/syslog System log. syslogd is the process that writes to this log. Linux
/etc/syslog.conf System log configuration. All
/var/adm/sulog log file
Logs all failed attempts to su to another user are logged here.
All
/etc/sulog.conf Sulog configuration All
/var/log Authlog - used for login authorization. All
/var/cron.log Cronlog All
/var/apach2/logs Authlog - used for login authorization. All
Networking
Command Description OS/Program
ping hostname

UNIX Path:/usr/sbin/

Use to check network connections UNIX & Windows
ifconfig -a

ifconfig NIC "up/down"
plumb

Example: ifconfig eth1 down

Path: /sbin/ or /usr/sbin/

Used to check the computers network configuration. Simular to ipconfig in windows.
To bring a NIC card/interface up or down. The CMD plumb sets the device to a physical interfase name.

This example bring the interface down.

All
arp hostname

UNIX Path: /usr/sbin/

The arp command is for name to address resolution. UNIX & Windows
nslookup servername Gives server IP address All
netstat -rn Shows routing table All
dladm show-link Shows network interfases Solaris
ntpdate NTP server

Path:/usr/sbin/

Resinks the local machine with the NTP servers date/time All
ipfw list Allows you to see the actual firewall rules
Must have ipf firwall installed to work. Installed on Mac OS X by default
All
From BSD
ipf Allows IP filtering
* Must be root to use
All
traceroute

Path: /usr/sbin/traceroute

Traces routes All
route add net IP IP

Path: /usr/sbin/

Add static routes All
NetBackup Commands & Files
Command & Files Description OS/Program
Drivers
add_drv driver Use to add/install drivers Solaris
rem_drv driver Use to remove drivers Solaris
sg.install Use to install drivers All
Important Netbackup files
hosts

Path: /etc/hosts

NetBackup uses this file to find hosts and servers. System
hosts.allow

Path: /etc/hosts.allow

NetBackup uses this file to allow services on servers and clients. system
bp.conf

Path: /usr/openv/netbackup/bp.conf

NetBackup network config file. Used to define server and clints.
* Note - this file does not exist on Windows machines. The NetBackup Client GUI takes care of this under "Specify NetBackup Machines".
NetBackup
auth.conf

Path:

NetBackup file permissions. NetBackup
NetBackup GUI

Path & CMD: /usr/openv/netbackup/bin/jnbSA

This the default path to the NetBackup GUI. Use this command to lanuch the app. NetBackup
Commmands
tpautoconf -t
-a
-v

Path: /usr/openv/volmgr

Shows how tape drives are being seen by NetBackup
Automaticly configures devices for you
Verbos - detail feedback
NetBackup
tpconfig -d

Path: /usr/openv/volmgr/bin

Allows you to rest tape devices. Can up or down devices. Allows you to manually configure tape NetBackup
cfgadm -al
-c unconfigure c[#]
-c configure c[#]
To inspect configuration Solaris 10
devfsadm -C -c device class (disk or tape) Resets special device files.
-C Clears special device files
-c Resets special device files
Solaris 10
sgscan all

Path: /usr/openv/volmgr/bin/

Validates how drivers see devices. NetBackup
netbackup start/stop

Path: /usr/openv/netbackup/bin/goodies

To start or stop NetBackup NetBackup
bp.start_all

Path: /usr/openv/netbackup/bin/
Windows path: {install Path}netbackup/bin/

NetBackup command to start NetBackup. NetBackup
UNIX
bp.kill_all Old NetBackup command to stop NetBackup. Use the new command netbackup. NetBackup
UNIX
S77netbackup start/stop

Path: /etc/rc2.d/S77netbackup

To start or stop NetBackup though the use of the rc script. System
bpdown

Path: \NetBackup\bin\

Brings NetBackup down in Windows. NetBackup
Windows
bpup

Path: \NetBackup\bin\

Brings NetBackup up in Windows. NetBackup
Windows
bpps -x
-x
-a

Path: /usr/openv/netbackup/bin/

Shows NetBackup Running processes.
-x Shows every Netbackup process.
-a Only shows important processes.
NetBackup
vxpbx_exchange start/stop

Path: /opt/VRTSpbx/bin

Use this to start or stop the PBX program. NetBackup needs this program to run. NetBackup
sg.build all

Path: /usr/openv/volmgr/bin/

NetBackup
bpbackup

Path: /usr/openv/netbackup/bpbackup

Use this command to start a NetBackup job from the command line. NetBackup
bpexpdate -host "hostname" -m "tape#" -d 0

Path: /usr/openv/netbackup/admincmd

Use this to zero out tapes so you can use them on other servers.
-d0 Zeros out tape
NetBackup
vmupcmd -h hostname -{up|down|reset} Used to up, down and reset drives NetBackup
nbrbutil

Path: /usr/openv/netbackup/bin/admincmd/

Resets Media server. Can eject stuck tapes. NetBackup
bpclntcmd
-hn hostname
-ip IP address
-hn with a hostname gives you what NetBackup see as the servers IP address
-ip with a IP address shows you what Netbackup thinks is the hostname.
NetBackup
Notes
Note * /opt/openv can be used instead of /usr/openv/
* Before you take a client server down. You must first remove the server from the NetBackup Master Server.
NetBackup
NetBackup Ports
bpcd
13782/tcp
NetBackup
vnetd
13724/tcp
NetBackup
bprd
13730/tcp
NetBackup
vopied
13783/tcp
NetBackup
bpjava-msvc
13722/tcp
NetBackup
NetBackup Logs
UNIX: /usr/openv/netbackup/logs/bpcd
Windows: {Install_Path}\netbackup\logs\bpcd
NetBackup
UNIX: /usr/openv/netbackup/logs/bprd
Windows: {Install_Path}\netbackup\logs\bprd
NetBackup
UNIX: /usr/openv/netbackup/logs/bpsched
Windows: {Install_Path}\netbackup\logs\bpsched
NetBackup
UNIX: /usr/openv/netbackup/logs/bpbrm
Windows: {Install_Path}\netbackup\logs\bpbrm
NetBackup
UNIX: /usr/openv/netbackup/logs/bptm
Windows: {Install_Path}\netbackup\logs\bptm
NetBackup
UNIX: /usr/openv/netbackup/logs/bpbkar
Windows: Install_Path}\netbackup\logs\bpbkar
NetBackup
UNIX: /usr/openv/netbackup/logs/tar
Windows: {Install_Path}\netbackup\logs\tar
For restore issues. NetBackup
UNIX: /usr/openv/netbackup/bin/logview NetBackup

The Windows Section
Command Description
dir path Show whats in a directory
cd path Change working directory
telnet server To login to remote machines
Security Notice
Transmits username and password in the clear.
ftp hostname Use to transfer files to and from computers
Security Notice
Transmits username and password in the clear. Use sftp instead.
sftp hostname Use to transfer files to and from computers. sftp is a secure version of ftp.
ipconfig
/all
/renew
/release
Displays network setting, like a computers IP address.
/all gives more details.
/renew gets new network settings from the DNS server.
/release releases the computers network settings
ping hostname Use to check network connections
netstat Gives you routes
tracecert Traces routes
nslookup servername Gives server IP address
route
print
ADD problem IP MASK Mask
print - Displays routing table.
ADD
type file Use this command to display the contents of a text file on the command line.
%SystemRoot%\System32\drivers\etc\hosts Location of host file
%SystemRoot%\System32\drivers\etc\services Location of services file

Program Commands
Command Description OS/Program
SQLPlus Command to login to Oracle Oracle
perl -v To see if ActivePerl is installed Perl
Miss
Command Description OS/Program/Shell
ed Used in a script to edit a file. Scripting
ypCMD Used to edit or make change when working with NIS. Nis is a directory service. NIS
Sun4u This is a normal Solaris server. Solaris
Sunfv This is a blade server. Solaris
RedHat When mentioning RedHat it also means. RedHat(RHEL)/Fordora.Cent OS RedHat
watch-net-all OK promt CMD. Shows NIC ports with cables attached to it. Spark hardware
show-net OK promt CMD. Shows all interfaces, with paths. Spark hardware
boot NIC name -install
-r
OK promt CMD. "NIC name" -install is for a network install. -r tells solaris to probe for hardware where booting Spark hardware
finger username Lets you look or find users. Disabled on many systems All
file filename Will display file type. All
ppriv pid
-a

Path: /usr/bin/ppriv

Get the effective privileges of a process.
-a shows all privileges for a process ID(pid).
Solaris
stop-slapd Stops the LDAP server. LDAP
start-slapd Starts a LDAP server. LDAP
which CMD Looks in your path for the command and displays its path. All
getfacl Modify the Access Control List (ACL) for a files All
Note ACL Example
-rwxr--r--+ 1 user4 staff 6 00:00 filename
The + stats that an non-trivial ACL has been set on the file.
All
while true Creates a loop that runs in-till the condition is met. Scripting
do CMD Do this command Scripting
done Closes a loop. Scripting

This page is just a place for me to hold my notes. Hey help me out, if your on this page, you most likely know me. So do me a favor and let me know if I have grammar or spelling errors. If you want to add your own notes to the page let me know. I will of course credit you, if you do. I need ideas to improve the layout, so if you have any tell me.

Links
Home |  My Notes |  Rentals  |  links