Department of Computing | Imperial College |
Managing your file space |
Imagine your file space as a filing cabinet with your files as records in the cabinet. If you randomly throw records into a filing cabinet the system becomes unmanageable, you cannot find things quickly, you do not know what you should keep, or even which records refer to each other. The answer is to use folders, grouping related information in one place, keeping it seperate from other records.
~/ (Your home directory) ~/bin (Binaries - application programs) ~/man (Manual pages for applications) ~/lab (Lab coursework) ~/lab/ex1 (Lab exercise one) ~/lab/ex2 (Lab exercise two)
ls
command.
This command can take several flags (options which modify the output of the
command), the more useful of which are:
/vol/bitbucket (shared file space) /usr/bin/X11 (X11 specific binaries) /homes/abc96 (home directory of user abc96)
pwd
command. Directories can be specified relative to this.
For example:
bin (The directory bin from with the current directory) ../ (The parent directory of the current directory) ../../ (The parent, of the parent, of the current directory)
~/ (your home directory) ~/bin (the bin directory, in your home directory) ~abc96/bin (the bin directory, in abc96's home directory) ~/.. (the parent directory, of your home directory)
mkdir
command. For example, to create a directory called
bin in your home directory type:
mkdir ~/bin
chdir
or
cd
command. For example, to change directory to ~/bin,
type:
chdir ~/binor
cd ~/bin
rmdir
command. The directory must first be
completely empty of all files (including hidden files). Use the
rm
command to delete
files.
Then use the rmdir command to remove the empty directory. For example, the following command will
remove a directory called bin in your home directory:
rmdir ~/bin
ls
cp
mv
ln
pwd
cd
mkdir
cat
more
tar
compress
chmod
quota
df
du
find
file
gzip
filename
and to 'uncompress':
gunzip
filename
© CSG / 1999 /
help@doc.ic.ac.uk /
![]() |