cd - change directories
Use cd to change directories. Type cd followed by the name of a directory to access that directory.Keep in mind that you are always in a directory and can navigate to directories hierarchically above or below.
mv- change the name of a directory
Type mv followed by the current name of a directory and the new name of the directory.
Ex: mv testdir newnamedir
pwd - print working directory
will show you the full path to the directory you are currently in. This is very handy to use, especially when performing some of the other commands on this page.
ls - Short listing of directory contents
-a list hidden files
-d list the name of the current directory
-F show directories with a trailing ‘/’
executable files with a trailing ‘*’
-g show group ownership of file in long listing
-i print the inode number of each file
-l long listing giving details about files and directories
-R list all subdirectories encountered
-t sort by time modified instead of name
cp - Copy files
cp file1 file 2
Copy the files “file1″ to the file “file2″ in the current working directory. This command will create the file “file2″ if it doesn’t exist. It will normally overwrite it without warning if it exists.
cp -i file1 file2
With the “-i” option, if the file “file2″ exists, you will be prompted before it is overwritten.
date:display the date and time
clear:clear the screen
who:display who is logged into the system
cal:shows calender
cal 2007:display whole month of the year
cal “month” “year”:display information about that month.
date >”filename”:copies the contents of the date command to a file.
|more:display more lines in a page.
Monday, December 3, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment