Important Aix Command

By: koushal

Some file commands are:

cp - Used to copy the contents of one file to another file.
Syntax: %cp original file name new file name
Example: %cp file1 file2

mv - Used to rename a file by moving the contents of the file to
another file.
Syntax: %mv original file name new file name
Example: %mv file1 file3

mv - Used to move a file from one directory to another directory.
This is a useful command for reorganizing the files in your
directories.
Syntax: %mv file name(s) directory name
Example: %mv file3 file4 Cprogs
The two files, file3 and file4, moved from the current working
directory to the directory Cprogs.

rm - Used to delete or remove a file permanently.
Syntax: %rm original file name
Example: %rm file1

*******************************************************************************

%rm -i file1

cat - Used to display the contents of a file at the shell prompt.
Syntax: %cat file name
Example: %cat file3

pg - Used to display the contents of a file with more than one
screenfull worth of text, one screen at a time.
Syntax: %pg file name
Example: %pg file3
To resume display after each screen is displayed, hit the
RETURN key.

more - Like pg, used to display a file one page at a time.
Syntax: %more file name
Example: %more file3
To resume display after each screen is displayed, hit the

*****************************************

To find out the directory you are currently in, type:

%pwd

which stands for "print working directory", and the system will display the pathname of the working directory.

**********************************************8

Whenever you create a directory, "mkdir" automatically places two entries into the directory: "." and ".." "." is the directory itself and is synonymous with the path name of the working directory. ".." is the parent directory and is synonymous with the pathname of the parent of the working directory. These directory entries are only visible if you include an option with the list directory command:

%ls - a
Some directory commands are:

mkdir - Used to create a directory.
Syntax: %mkdir ./directory name
Example: %mkdir ./fortprogs

cd - Used to change current working directory to another directory.
Syntax: %cd /directory name
Example: %cd /projects/fortprogs
%cd .. (Moves up one directory level)
%cd . (Change to current directory)

rmdir - Used to remove a directory. The directory must be empty.
Syntax: %rmdir ./directory name
Example: %rmdir ./fortprogs

pwd - To display to the screen the current working directory.
Syntax: %pwd

Computers
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 

» More on Computers
 



Share this article :
Click to see more related articles