I'll start by example:
$ ls -l dir1
total 4
-rw-r--r-- 4 maythux maythux 1650 2008-01-10 16:33 file
lrwxrwxrwx 1 maythux maythux 7 2008-01-15 15:17 symfile -> file
symfile
is a symlink of the file file
Also as i know 1650
would be the size of the file file
, but what is the number 7
that is laid under the size column?
EDIT:
Running du
:
$ du -sh symfile
0 symfile
So how could you prove that 7 is the symlink size?!
UPDATE:
try this
$ touch file
$ du -sh file
0 file
$ ls -l file
-rw-rw-r-- 1 maythux maythux 0 Jun 1 19:42 file
note that size is also here 0.
Now:
$ ln -s file sym
$ du -sh sym
0 sym
$ ls -l sym
lrwxrwxrwx 1 maythux maythux 4 Jun 1 19:44 sym -> file
So, I suppose it's not only a size
7
depends on the filesystem (and possibly other parameters). It's 7 on ext4, but could be 13 on btrfs and 3 on tmpfs.mkdir foo; ls -ld foo; for i in {1..1000}; do ln -s foo/bar foo/$i; done; ls -ld foo
.