Tagged Questions
2
votes
3answers
114 views
What has happened to the file when I entered “mv file.txt ../”?
I wanted to move 'file.txt' one folder up, but instead of mv file.txt ../file.txt I entered mv file.txt ../.
Now the file is gone and I didn't get any error message. So it seems the some action was ...
0
votes
2answers
92 views
Remove soft link but not the target
I have a directory that contains a link to another directory that I just created. I would like to remove the link but preserve the directory my link was pointing to. How do I do this?
> mkdir rgac
...
3
votes
1answer
113 views
Can we use symbolic link and hard link for directories?
I know we can do that for files. What about directories?
It seems that cpanel uses that a lot.
0
votes
1answer
68 views
pwd resolving symbolic links [duplicate]
Possible Duplicate:
pwd without symlinks
Imagine I have a directory
/home/me/dir
and a symbolic link to it called
/home/me/dirlink
now if I enter dirlink and use pwd, it of course ...
3
votes
2answers
159 views
Why is bash giving me (apparently) conflicting information about a file?
Background
I am working on a RHEL 5 cluster. I want my Fortran program to read the file /home/bob/inputs/input_1
I asked Bob to give me permission to read all contents of inputs:
[bob@server]$ ...
4
votes
2answers
88 views
Quicker Way to Reference a Directory?
This one is probably easy for all of you, but I have never had to deal with such a nested local set of directories.
If I have a path like: /mnt/media2/Archived\ Files/_Transfer/ is there a way to ...
3
votes
2answers
150 views
open a file using CDPATH and symlink
To quickly move around, I added a path to CDPATH that contains symlinks to different locations. I did this by adding the following line to .bashrc:
export CDPATH=~/symlinks
When working with ...
1
vote
1answer
372 views
How does apache determine what directory to show from public_html?
I am using Ubuntu 12.04 and have configured apache to serve from ~/public_html. I am trying to serve some directory contents over http on LAN.
When I did the following:
ln -s ...
4
votes
2answers
509 views
What causes ln: //: Is a directory?
When linking a directory to root, I get this error:
$ ln -s ~/inbox/ /
$ ln: //: Is a directory
Bash autocompletes the directory path by adding a /. I've tried escaping without success.
$ ln -s ...
1
vote
2answers
212 views
Bash prompt when my home directory is a symbolic link
I symlinked my /host/Users/Kevin folder to /home/Kevin. I also edit the /etc/passwd file to /home/Kevin. I logged out and logged back in, however when I open up a terminal it's a bash prompt like so:
...
9
votes
4answers
2k views
symbolic link to a directory and relative path
I've created symlink with absolute path to the directory (Blink) and have for example following tree:
$ ls -l /tmp/A
total 0
lrwxrwxrwx 1 root root 6 Apr 3 12:27 Blink -> /tmp/B
-rw-r--r-- 1 root ...
1
vote
1answer
224 views
How to link a folder to create a shortcut
I have this folder:
/var/www/vhosts/foo
that I need to access often. If I do (I'm root):
ln -s /var/www/vhosts/foo/
cd foo
pwd tells me /root/foo
What can I do to really go into the folder ...
3
votes
2answers
621 views
Trailing slashes on symbolic links to directories
I'm trying to emulate the process of path resolution (see man page path_resolution) in unix-like systems.
My OS is Linux with GNU coreutils 8.7.
In order to clarify the meaning of extra trailing '/' ...
3
votes
4answers
832 views
Accidental deletion of /lib directory in Fedora 15
I accidentally deleted the /lib directory on my Fedora 15 machine and I'm not sure how to go about fixing this. Any help in figuring out how to restore the directory along with symbolic links would be ...
11
votes
4answers
3k views
Converting relative path to absolute path
Is there a *nix command to get absolute(and canonicalized) path from relative path(with current path) or symbolic link?
29
votes
2answers
7k views
Why hard links not allowed to directories in UNIX/Linux
I read in text books that UNIX/Linux doesn't allows hard links to directories but soft links do. Is it because, when we have cycles and if we create hardlinks, and after some time we delete the ...
-1
votes
2answers
639 views
Replace symbolic link which linked to directory target
I want to upgrade tomcat server from 7.0.19 to 7.0.20.
I've already ln -s apache-tomcat-7.0.19 tomcat7 before, so now I need to link tomcat7 to new target using the following command ln -s --force ...
2
votes
1answer
1k views
Why can't list file/directory relative to .. from a symbolic link directory (No such file or directory)?
I have a /usr/tomcat6/logs directory linked to /var/log/tomcat6.
When I changed directory to /usr/tomcat6/logs and try to ls files using a relative pathname ../conf/Catalina/localhost, a No such file ...
9
votes
4answers
422 views
Include / in symlink to a directory?
Symlinking to a directory gives to different results with ls -l depending on whether I ln -s dir or ln -s dir/. But what's the actual difference, and which one should I prefer why?
7
votes
3answers
1k views
How does one atomically change a symlink to a directory in busybox?
I am trying to (as close as possibly) atomically change a symlink. I've tried:
ln -sf other_dir existing_symlink
That just put the new symlink in the directory that existing_symlink pointed to.
ln ...