Page 1 of 1

[Sug] Add special icons for symbolic link file/directory

Posted: 2011-06-17, 21:36 UTC
by DeathStalker
It would be very convenient if you add a special icons for symbolic links file/directory.

For example (symlink folders):
[img]http://img804.imageshack.us/img804/9986/screenshot2d.jpg[/img]

PS. For symlink files do likewise.

Posted: 2011-06-20, 13:39 UTC
by ghisler(Author)
Unfortunately Total Commander knows nothing about links in normal mode, only in root mode (folders where normal users don't have read rights). There seems to be no Java function to detect links. Maybe I can show them with a special icon in such root folders.

Posted: 2011-06-20, 15:19 UTC
by DeathStalker
I have root in my phone.
For example result shell command toolbox ls -a -l in the directory /data:

Code: Select all

-rw-rw-rw- root     root            0 2011-06-20 19:09 log.txt
drwx------ system   system            2011-06-20 10:26 backup
drwxrwx--t system   misc              2011-06-20 19:08 misc
drwx------ root     root              2011-06-20 10:26 property
lrwxrwxrwx root     root              2011-06-16 00:35 drm -> /data/local
drwxr-xr-x system   system            2011-06-19 00:41 tombstones
-rw-rw-r-- root     radio      155648 2011-06-18 20:11 fb-phone-daemon.log
drwxr-x--- root     log               2011-06-16 00:35 dontpanic
drwxrwx--x shell    shell             2011-06-16 01:18 local
drwxrwxr-x system   system            2011-06-20 19:07 system
lrwxrwxrwx root     root              2011-06-16 01:07 app -> /sd-ext/app
lrwxrwxrwx root     root              2011-06-16 01:07 app-private -> /sd-ext/app-private
lrwxrwxrwx root     root              2011-06-16 01:07 dalvik-cache -> /sd-ext/dalvik-cache
drwxrwx--x system   system            2011-06-20 10:28 data
drwxrwx--- root     root              2011-06-16 00:35 lost+found
And result shell command toolbox ls -a -l in the directory /system/xbin:

Code: Select all

...
...
...
lrwxrwxrwx root     root              2011-06-16 01:05 addgroup -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 adduser -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 su -> /system/bin/su
lrwxrwxrwx root     root              2011-06-16 01:05 ls -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 lsattr -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 lsmod -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 lspci -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 lsusb -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 lzcat -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 lzma -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 lzop -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 lzopcat -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 makedevs -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 makemime -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 man -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 md5sum -> /system/xbin/busybox
lrwxrwxrwx root     root              2011-06-16 01:05 mdev -> /system/xbin/busybox
-rwsr-xr-x root     root      1867568 2008-08-01 16:00 busybox
-rwsr-xr-x root     root       887168 2008-08-01 16:00 openvpn
-rwsr-xr-x root     root          479 2008-08-01 16:00 iproute-wrapper
drwxr-xr-x root     root              2011-06-16 01:18 bb

Posted: 2011-06-23, 12:57 UTC
by ghisler(Author)
Thanks, I have now added code for the next beta where TC shows the link target (with ->) and <lnk> in the size column. However, this will only be done in folders which cannot be read with Java functions, like /data. The Jave functions don't allow to get the link target.

symbolic links

Posted: 2012-04-09, 23:10 UTC
by Gadgeteer
Hi

Is there a tutorial anywhere on how to create symbolic links in Android using Total Commander?

Many thanks

Posted: 2012-04-12, 12:56 UTC
by ghisler(Author)
You need to create a button with type "Shell command", then set the command either to
sh (for non-rooted devices)
or
su (for rooted devices)
Parameters:
ln -s "%P%N" "%T%N"

This should create a link of the file or folder under the cursor in the folder of the other panel. I haven't tested it, so please be careful.

Posted: 2012-05-29, 13:28 UTC
by regs
works well, moved some large folder from internal storage to external sd card.

but there is a one thing. when i tryed to move one folder back, i forgot to delete symlink first. so it just deleted folder.

it needs some check whatever there is a symlink or not - stop moving/copying, or delete symlink and proceed.

Posted: 2012-05-29, 16:59 UTC
by CoMiKe
Hi Christian.

Take a look at these pages. They reveal a possible solution to the problem using Java code:

http://stackoverflow.com/questions/7281612/android-determining-a-symbolic-link

http://stackoverflow.com/questions/813710/java-1-6-determine-symbolic-links

Posted: 2012-05-30, 13:09 UTC
by ghisler(Author)
I'm already doing this now when the user uses the search function. It would probably be too slow for browsing folders, especially with many subfolders.

Posted: 2017-08-13, 16:31 UTC
by DrShark
ghisler(Author) wrote:It would probably be too slow for browsing folders, especially with many subfolders.
What if it will be disabled by default? Though rarely, but this feature could be used to look for symlinks (that I would like to add in TC4A ignore list.)