Originally Posted by kbp
You need to be aware of the difference between relative and absolute paths... a directory with a leading '/' is an absolute path
'/usr' means the 'usr' directory under '/' (the root)
'usr' means the 'usr' directory in your current directory
To modify the 'usr' directory under '/tmp', it's absolute path is '/tmp/usr'
$ mv /tmp/usr /tmp/usr-modi
$ ls /tmp
If your current directory was '/tmp' then you could also refer to it by the relative path 'usr' or './usr'
$ mv usr usr-modi
To fix your current problem, try these steps:
$ mv /usr-modi /usr
$ cd /tmp
$ tar -zxvf gfortran.tar.gz -C /
Thanks! But I guess I didn't explain clearly.
In fact, when I said I try to modify the name of the directory '/usr', I did mean that I modified the one under /tmp.
So the problem is that, when I input:
#mv /tmp/usr /tmp/usr-modi
then, not only '/usr' under /tmp changed its name, '/usr' under the root directory also did.
It seems that the misused 'tar -zxvf gfortran.tar.gz' has constructed a connection between these two '\usr' directories. I want to delete the one under \tmp, but I am afraid I would delete the one under \root at the same time...