Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create symbolic links of /data/sdext2/app/* on /data/app.
This is what I did in adb shell
ln -sf /data/sdext2/app/* /data/app/
But it is telling "link failed No such file or directory".
Note that none of the partitions are of FAT32 format.
And without -f option it says "link failed File exists".

share|improve this question

ln only takes 2 arguments at most (not counting options), the ../* wildcard however expands to all filenames in the folder. Just do place an echo before ln to see what happens.

Do it one by one this way:

cd /data/sdext2/app
for i in *; do ln -s /data/sdext2/app/"$i" /data/app/;done


for i in /data/sdext2/app/*; do ln -s "$i" /data/app/$(basename "$i");done


Ok, this is how it works on my device:

me@workstation:~$ adb shell
shell@android:/ $ id
uid=2000(shell) gid=2000(shell) groups=1003(graphics),1004(input),1007(log),[...]
shell@android:/ $ su
shell@android:/ # id
uid=0(root) gid=0(root) groups=1003(graphics),1004(input),1007(log),[...]
shell@android:/ # cd /data/
shell@android:/data # ln -s /data/sdext2/app/ /data/app/
shell@android:/data # ls -l /data/app/
lrwxrwxrwx root root 2012-11-06 22:30 /data/app/ -> /data/sdext2/app/

share|improve this answer
Will that link hidden files/folders? – Matthew Read Nov 6 '12 at 16:13
Hehe :-) Of course not, but the original attempt wouldn't do that either (so I didn't bother). – ce4 Nov 6 '12 at 16:50
still same problem.. i can use other apps like root explorer and link2sd to create soft links.. wonder how it is done.. – 2991ambusher Nov 6 '12 at 20:00
See my update, also read more on the ln command here. – ce4 Nov 6 '12 at 21:38
so.. what do u exactly want me to do?? – 2991ambusher Nov 7 '12 at 16:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.