Ubuntu
Ubuntu
You might occasionally want to have a listing of all the subdirectories, also. A simple -R
way through the subdirectories, you could type ls -laR.
pwd
This command simply shows what directory you're in at the moment. It stands for "Print
Working Directory". It's useful for scripting in case you might ever want to refer to your
current directory.
cp
ln
A feature of linking files is available in Linux. It works by "redirecting" a file to the actual
file. It's referred to as a symbolic link. Don't confuse this term with the linking of
programs, which is when binary programs are connected with libraries that they need to
load in order to run.
The most simple way that I've ever used ln to create symbolic links is ln -s
existing_file link. Evidently there's a hard link and a symbolic link; I've been using a
symbolic link all along. You can also use the -f flag to force the command line to
overwrite anything that might have the symbolic link's file name already.
To remove a symbolic link, simply type rm symbolic_link. It won't remove the file that
it's linked to.
mv
You can't move a directory that is located in one partition to another, unfortunately. You
can copy it, though, using cp -rpf, and then remove it with rm -rf later on. If you have
only a single partition that makes up your filesystem then you have very little to worry
about in this area.
rm
The rm command is used for removing files. You use it just like the del or delete
command in MS-DOS. Let's say you want to remove a file called foobar in your current
directory. To do that, simply type rm foobar. Note that there is no "Recycle Bin" like in
Windows 95. So when you delete a file, it's gone for good.