A Summary of Useful UNIX Commands
Now that you have started to make use of your Liberty file space (by
creating the public_html subdirectory) you'll probably need to know
some of the commands to maintain it. We've used several already:
- mkdir directoryname will create a subdirectory within
the directory from which you issue the command.
- cd directoryname will change to the named directory
- ls will list the contents of the (sub)directory you are in
- ls -l will give you the long form of the directory
listing, useful to check the permissions of a file
- ls -l |more will show you the long form of the directory one
screen at a time --very useful when you have many files in a directory
- pwd ('print working directory') will print the whole path of
the directory you are in
- pico somefilename will open the pico editor and
bring up the named file if it already exists, or provide space to create
a new file if somefilename doesn't already exist.
- <CONTROL><X> will exit pico and offer you
the opportunity to save or not save the file you've been working
on.
Some additional UNIX commands:
- rm somefilename will delete the named file
- cd .. will move you up the directory hierarchy (for
example, from your public_html subdirectory to your Liberty home
directory)
- mv somefilename anotherfilename will rename the
file somefilename
- mv can also be used to move a file from one directory to
another, but you need to specify the path:
mv somefile.xxx ../somedir
will transfer the file somefile.xxx to the directory named
'somedir'
- cp is the 'copy' command:
cp somefile.xxx
../somedir
will copy the file
somefile.xxx to the directory named 'somedir'
- more somefilename will allow you to read (but
not edit) a file screen by screen
There are other UNIX commands (lots of them), but this set will cover
most of the situations you're likely to run into in maintaining the files
in a public_html directory.