Fun with dots.
Fun with dots.
In addition to the answer from Andrew Benton,
. is the current directory
.. is the parent directory of the current directory.
If you are in say, /home/drzayus, and want to copy a file there, say /var/log/somelog.log, you could:
$ cd
$ pwd
/home/drzayus
$ cp /var/log/somelog.log .
Then you would have a copy of that log in your home directory.
Also, then, I suppose you could run:
$ cp /var/log/somelog.log ..
which would copy the file to drzayus' parent directory, /home.
(I'm not currently on a linux machine to be able to test that second example
, but it should work.)
The . and .. can come in handy.
|