Symlinks
- simoncasey
- Wizard
- Posts: 1761
- Joined: Sun Apr 19, 2009 08:10
- Location: Melbourne
Symlinks
I've worked out how to create a symlink on the T3 to my NAS using file commander. Is there anyway to specify a different name for the link either as part of creating the link or by editing the link afterwards. I realise I can do that by telnet but I wanted to show somebody how to do it using the UI.
Beyonwiz T4
-
- Wizard God
- Posts: 32712
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
Re: Symlinks
You can almost certainly rename the link in the same way you can rename a file (but I haven't actually tried that). If you want to give a different target to the link, you need to delete it and make a new one.simoncasey wrote:I've worked out how to create a symlink on the T3 to my NAS using file commander. Is there anyway to specify a different name for the link either as part of creating the link or by editing the link afterwards. I realise I can do that by telnet but I wanted to show somebody how to do it using the UI.
In commandline terms:
Code: Select all
ln -s x y # create a link called y that references x
mv y z # The link is now called z, but it still references x
Code: Select all
ln -s x y # create a link called y that references x
rewritelink w y # You can't make y point at something else
Code: Select all
ln -s x y # create a link called y that references x
rm y # delete the link y
ln -s w y # create a link called y that references w
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
- simoncasey
- Wizard
- Posts: 1761
- Joined: Sun Apr 19, 2009 08:10
- Location: Melbourne
Re: Symlinks
If i try to rename the sympink using the blue button in file commander I get an error
mv: can't rename xxxx : Not a directory
mv: can't rename xxxx : Not a directory
Beyonwiz T4
Re: Symlinks
You can change a symlink from the command line without having to use rm.prl wrote:If you want to give a different target to the link, you need to delete it and make a new one.
Code: Select all
ln -nsf target existing_link
- simoncasey
- Wizard
- Posts: 1761
- Joined: Sun Apr 19, 2009 08:10
- Location: Melbourne
Re: Symlinks
I found an easy solution to this and also what appears to be a bug in file commander.
What I was trying to do is use the UI to create a symlink to a directory on my NAS.
I created the link using file commander and then tried to rename it in file commander as the link is automatically given the same name as the destination folder
I get an error saying that it is not a directory, so it may not be checking the file type properly and assuming it is a directory and doing something specific (-r perhaps or ending the name with a /)
However, if I use the movie list I can rename the link without an error and all is good.
What I was trying to do is use the UI to create a symlink to a directory on my NAS.
I created the link using file commander and then tried to rename it in file commander as the link is automatically given the same name as the destination folder
I get an error saying that it is not a directory, so it may not be checking the file type properly and assuming it is a directory and doing something specific (-r perhaps or ending the name with a /)
However, if I use the movie list I can rename the link without an error and all is good.
Beyonwiz T4
Re: Symlinks
Hi,
dRdoS7
You say: "bug", others say: "undocumented feature".simoncasey wrote:I found an easy solution to this and also what appears to be a bug in file commander.
dRdoS7