In general, for all shells,
rm works on a symbolic link itself
cp, mv, rmdir, etc. work as if the symbolic link is the thing it is
pointing too (dereferenced)
This is without using any options to these functions.
|
|
0
|
|
|
|
Reply
|
lite.on.beta (15)
|
3/25/2012 1:32:57 AM |
|
In article <0f9803d2-1917-4d97-af3b-e858e6862862@d17g2000vba.googlegroups.com>,
Beta What <lite.on.beta@gmail.com> wrote:
> In general, for all shells,
>
> rm works on a symbolic link itself
> cp, mv, rmdir, etc. work as if the symbolic link is the thing it is
> pointing too (dereferenced)
>
> This is without using any options to these functions.
On Macs 'man 7 system' discusses this. I don't know if the same manpage is on
Linux.
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/
man7/symlink.7.html
--
My name Indigo Montoya. | R'lyeh 38o57'6.5''S 102o51'16''E.
You flamed my father. | I'm whoever you want me to be.
Prepare to be spanked. | Annoying Usenet one post at a time.
Stop posting that! | At least I can stay in character.
|
|
0
|
|
|
|
Reply
|
chine.bleu (655)
|
3/25/2012 1:45:07 AM
|
|
Woah. Best reference ever!
I tried reading so many online tutorials on this, but they should all
be replaced to a link to this.
|
|
0
|
|
|
|
Reply
|
lite.on.beta (15)
|
3/25/2012 3:25:20 AM
|
|
On 2012-03-25, Beta What <lite.on.beta@gmail.com> wrote:
> In general, for all shells,
>
> rm works on a symbolic link itself
> cp, mv, rmdir, etc. work as if the symbolic link is the thing it is
> pointing too (dereferenced)
>
> This is without using any options to these functions.
Are you sure about mv?
|
|
0
|
|
|
|
Reply
|
ike7 (162)
|
3/25/2012 7:24:16 AM
|
|
On Sunday 25 March 2012 09:24, Ike Naar conveyed the following to
comp.unix.questions...
> On 2012-03-25, Beta What <lite.on.beta@gmail.com> wrote:
>> In general, for all shells,
>>
>> rm works on a symbolic link itself
>> cp, mv, rmdir, etc. work as if the symbolic link is the thing it is
>> pointing too (dereferenced)
>>
>> This is without using any options to these functions.
>
> Are you sure about mv?
mv works on the symlink, not on what the symlink points at.
--
= Aragorn =
(registered GNU/Linux user #223157)
|
|
0
|
|
|
|
Reply
|
stryder2 (284)
|
3/25/2012 7:30:50 AM
|
|
On 25-03-2012 03:45, China Blue Water Navy wrote:
> In article <0f9803d2-1917-4d97-af3b-e858e6862862@d17g2000vba.googlegroups.com>,
> Beta What <lite.on.beta@gmail.com> wrote:
>
>> In general, for all shells,
>>
>> rm works on a symbolic link itself
>> cp, mv, rmdir, etc. work as if the symbolic link is the thing it is
>> pointing too (dereferenced)
>>
>> This is without using any options to these functions.
>
> On Macs 'man 7 system' discusses this. I don't know if the same manpage is on
> Linux.
>
>
> https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/
> man7/symlink.7.html
>
for linux the link is:
http://www.kernel.org/doc/man-pages/online/pages/man7/symlink.7.html
|
|
0
|
|
|
|
Reply
|
luuk (814)
|
3/25/2012 12:45:45 PM
|
|
On Sat, 24 Mar 2012 18:32:57 -0700, Beta What wrote:
> In general, for all shells,
This has nothing to do with shells.
> rm works on a symbolic link itself
> cp, mv, rmdir, etc. work as if the symbolic link is the thing it is
> pointing too (dereferenced)
You got one out of three right. mv and rmdir behave like rm, i.e. mv will
rename the symlink, rmdir will complain that the symlink isn't a directory.
> This is without using any options to these functions.
In general: operations on directory entries (mv, rm, rmdir) treat a
symlink as a symlink. Operations on the contents of files (or directories)
(cp, cat) treat a symlink as the object it points to.
|
|
0
|
|
|
|
Reply
|
nobody (4805)
|
3/26/2012 1:27:30 AM
|
|
|
6 Replies
84 Views
(page loaded in 0.107 seconds)
Similiar Articles: TFTP server and symbolic links - comp.unix.solaris... server following symbolic links ... the same inetboot file to ... better TFTP server >program that will run on Solaris, that will follow sym links? It can't follow symbolic ... Creating Runtime Solutions - comp.databases.filemakerGo To Developer Utilities Select the file I want to create a ... Developers Guide that comes with the software ... how to create a symbolic link in linux at runtime ... TIFF - packed bits. Lossless compresion or not? - comp.graphics ...Is there any way produce a postscript file of ... Unfortunately, ImageMagick will not work with ... usr/local/stow/application_name and symbolic links set up so the programs ... cannot find entry symbol _start - comp.unix.programmer... call 'gcc -v' and look in the specs file ... had decided that you were going to work ... Cannot overwrite an existing symbolic link - comp.unix.solaris ... The program is free ... lpr .errors - comp.unix.solarisIf there is no such software, they should be ... printers with lpadmin -p name -s name may work ... If so, is it a real file, or a symbolic link to another file? Finding environment variables usage - comp.unix.programmer ...E.g. under Linux you could read the pseudo-file ... truss -u libc:getenv /bin/ls but that didn't work ... how to show symbolic links in window environment? - comp.unix ... Create direcotry recursively - comp.unix.programmer... if an intermediate path exist as symbolic link ... be 'they believe to know how to program ... find any way in api to make it work ... in a path SYNOPSIS cc [ flag ... ] file ... differences between /bin, /usr/bin and /usr/local/bin - comp.unix ...On Solaris, /bin is a symbolic link to /usr/bin. ... found in a shared library (*.so) file ... will presumably continue to work, and there's no reason you can't link ... matlab crashes (win 7 64 bit) without messages, logs or dumps ...If this MEX-file doesn't work, you have a linking problem. ... mexErrMsgTxt("Super3"); return; } But the program ... would start with: make a very simple MEX-file that links ... Runtime.exec help please - comp.lang.java.programmer... the spaces in the parameter but cannot get it to work ... run file.bat from java - comp.lang.java.security ... comp.lang.java.programmer how to create a symbolic link in ... DiskJunction: Find, Create, and Delete Symbolic Links - Download ...Symbolic Links, symlinks ... pre-existing links and it's a command line program which many people prefer not to use. Our utility ... will show the link and the target file ... Complete Guide to Symbolic Links (symlinks) on Windows or Linux ...Soft symbolic links work ... command line utilities offer a way to delete a symbolic link ... by the file system. Any software program, upon accessing a symbolic link, will ... 7/27/2012 10:18:36 PM
|