Learning about commands

Many simple commands for HP-UX and Linux resemble one another closely and also have strong parallels to DOS commands. Table A-2 gives a few examples.

Table A-2. Comparison of DOS and HP-UX or Linux Commands

Desired Result

DOS

HP-UX or Linux

Display names of files in current directory

dir /w

ls

Display names, sizes, and dates of files

dir

ls -l

Display all files, including "hidden" ones

dir /a

ls -a

Display files in another directory

dir path[*]

ls -l path[]

Change current working directory

cd path[*]

cd path[]

Display the current working directory

cd

pwd

Move up one level from current working directory to its immediate parent directory

cd ..

cd ..

Rename file1 as file2

move file1 file2

mv file1 file2

Relocate file into a different directory

move file path[*]

mv file path[]

Copy file into a different directory

copy file path[*]

cp file path[]

Delete file

del file

rm file

Make a subdirectory in the current directory

md subdir

mkdir subdir

Remove a subdirectory (if empty)

rd subdir

rmdir subdir

Display a text file, one screen at a time

type file | more

more file or cat file | more

Attempt to execute file as a program

file

file[]

[*] DOS: absolute path D:\dir\subdir; relative path subdir.

[] HP-UX/Linux: absolute path /dir/subdir; relative path subdir

[] Linux systems, especially, may assume that file should be in your bin subdirectory.

The HP-UX and Linux man command (man ls, etc.) gives you access to online documentation. Many HP-UX manuals are available on the Internet, and generic documentation for Linux can be found on the Internet at the GNU Project site of the Free Software Foundation.



ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net