Greetings!
Don't know if this is a XFCE flaw, but when I use Thundar to create a link for a file, especially image files, the link is the same size as that parent file! At that rate you might as well not have a link but use the original file. Don't "pointer" link files only need a few bytes to do their job? Please enlighten me.
Jim in NYC
Portesus 3.0rc1 32bit XFCE 4.10
Why are links as large as parent file?
-
- White ninja
- Posts: 29
- Joined: 23 Mar 2012, 18:44
- Distribution: Porteus 1.2 XFCE 64bit
- Location: Cyprus
Re: Why are links as large as parent file?
Hi Jim
Not sure what you looking at, however there are 2 kinds of links, hard links and symbolic links, a hard link will appear as a diffrent file not a link and appear as the same size, if you delete the original file the link will still exist as a copy of the file, here is an example, this will actually report as a seprate file which means that it appears you are using more space than is physically on disk. when editing the link file in midnight command it warns you it is a hard link and asks if you want to break the link, using nano it saves changes in the original file.
$ echo test > test.txt
$ ln test.txt test.lnk
$ ls -l
total 8
-rw-r--r-- 2 gx gx 5 Feb 10 06:45 test.lnk
-rw-r--r-- 2 gx gx 5 Feb 10 06:45 test.txt
$ cat test.txt
test
$ cat test.lnk
test
$ rm test.txt
$ ls -l
total 4
-rw-r--r-- 1 gx gx 5 Feb 10 06:45 test.lnk
$ cat test.lnk
test
Regards
GX
Not sure what you looking at, however there are 2 kinds of links, hard links and symbolic links, a hard link will appear as a diffrent file not a link and appear as the same size, if you delete the original file the link will still exist as a copy of the file, here is an example, this will actually report as a seprate file which means that it appears you are using more space than is physically on disk. when editing the link file in midnight command it warns you it is a hard link and asks if you want to break the link, using nano it saves changes in the original file.
$ echo test > test.txt
$ ln test.txt test.lnk
$ ls -l
total 8
-rw-r--r-- 2 gx gx 5 Feb 10 06:45 test.lnk
-rw-r--r-- 2 gx gx 5 Feb 10 06:45 test.txt
$ cat test.txt
test
$ cat test.lnk
test
$ rm test.txt
$ ls -l
total 4
-rw-r--r-- 1 gx gx 5 Feb 10 06:45 test.lnk
$ cat test.lnk
test
Regards
GX
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Why are links as large as parent file?
Thunar is showing you the size attribute of the file to which it is linked, not the actual size of the symlink.
I put a .png file (transmission.png) in a folder, then hit right click -> send to -> Desktop (create link). The image is 2.7kB; when I view the link in Thunar it shows 2.7kB as well. When I view it via xfce4-terminal, however, the truth comes out:
The link is only 30 bytes, whereas the actual file is 2.7kB.
I put a .png file (transmission.png) in a folder, then hit right click -> send to -> Desktop (create link). The image is 2.7kB; when I view the link in Thunar it shows 2.7kB as well. When I view it via xfce4-terminal, however, the truth comes out:
Code: Select all
root@porteus:~/Desktop# ls -l
total 4
lrwxrwxrwx 1 root root 30 Feb 9 22:27 link\ to\ transmission.png -> /root/Desktop/transmission.png
-rw-r--r-- 1 root root 2683 Feb 9 22:27 transmission.png
Please take a look at our online documentation, here. Suggestions are welcome!
-
- White ninja
- Posts: 29
- Joined: 23 Mar 2012, 18:44
- Distribution: Porteus 1.2 XFCE 64bit
- Location: Cyprus
Re: Why are links as large as parent file?
thanks for the clarification Ahau, I didnt give much attention to the fact that jim mentioned he was using Thunar
GX
GX
Re: Why are links as large as parent file?
Thanks for that clarification as well, Ahau. I wonder if the XFCE folks realize that misunderstanding could throw a lot of confused newbies. They should really mention this in their docs or just make the link reveal its true size like in Macs and XP!Ahau wrote:Thunar is showing you the size attribute of the file to which it is linked, not the actual size of the symlink.
I put a .png file (transmission.png) in a folder, then hit right click -> send to -> Desktop (create link). The image is 2.7kB; when I view the link in Thunar it shows 2.7kB as well. When I view it via xfce4-terminal, however, the truth comes out:The link is only 30 bytes, whereas the actual file is 2.7kB.Code: Select all
root@porteus:~/Desktop# ls -l total 4 lrwxrwxrwx 1 root root 30 Feb 9 22:27 link\ to\ transmission.png -> /root/Desktop/transmission.png -rw-r--r-- 1 root root 2683 Feb 9 22:27 transmission.png
Jim in NYC
- brokenman
- Site Admin
- Posts: 6104
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
- Contact:
Re: Why are links as large as parent file?
or just make the link reveal its true size like in Macs and XP
I've always found that to be useless. Who wants to know the (real) size of a symlink? It never changes! It is usually the target file that one is interested in. For example I place my savefile.dat at:
/mnt/sda2/some/ridiculously/long/and/difficult/to/access/path/savefile.dat
I want easy access so I place a symlink on my desktop. In thunar I can simply look at the symlink file on the desktop. I believe the behaviour is superior as long as the symlink icon differentiates it from a real file.
I've always found that to be useless. Who wants to know the (real) size of a symlink? It never changes! It is usually the target file that one is interested in. For example I place my savefile.dat at:
/mnt/sda2/some/ridiculously/long/and/difficult/to/access/path/savefile.dat
I want easy access so I place a symlink on my desktop. In thunar I can simply look at the symlink file on the desktop. I believe the behaviour is superior as long as the symlink icon differentiates it from a real file.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- freestyler
- Contributor
- Posts: 384
- Joined: 17 Oct 2013, 14:21
- Distribution: Porteus XFCE