mount a windows directory: mount -o noacl -f "c:/Program Files" "/mount/programfiles"
Disable permission check when accessing Windows files:
- Add the following line to /etc/fstab: none /cygdrive cygdrive binary,posix=0,user,noacl 0 0
- http://grokbase.com/t/gg/android-ndk/119y40nkkk/ndk-r6-for-windows-does-not-support-symbolic-link-symlink-in-cygwin
Symbolic links on Windoes do NOT work. - An NTFS symbolic link is not the same as a Windows shortcut file, which is a regular file.
http://www.cygwin.com/cygwin-ug-net/using-effectively.html#using-shortcuts
http://cygwin.com/ml/cygwin/2003-09/msg01863.html
This command creates shortcut file: export CYGWIN=winsymlinks; ln -s ... - Shortcut files cannot be recognized by Cygwin. Instead I must use mklink :-(.
See the following link to configure permission first:
http://stackoverflow.com/questions/6722589/using-windows-mklink-for-linking-2-files
A useful script:
#! /bin/bash function conv() { file="$1" target="$(readlink $file)" echo "file is $file; target is $target" rm "$file" #ln -s "$target" "$file" # mkshortcut -n "$file" "$target" winEscapedTarget="${target//\//\\}" #convert to windows path separator winEscapedTarget="${winEscapedTarget//\\\\/\\}" #change \\ to \ winEscapedFile="${file//\//\\}" #convert to windows path separator winEscapedFile="${winEscapedFile//\\\\/\\}" #change \\ to \ echo /cygdrive/c/Windows/System32/cmd.exe /c mklink "$winEscapedFile" "$winEscapedTarget" /cygdrive/c/Windows/System32/cmd.exe /c mklink "$winEscapedFile" "$winEscapedTarget" echo "re-link is done!" } if [ $# -gt 0 ]; then basedir="$1" if [ -d "$basedir" ]; then cd "$basedir" if [ $? -ne 0 ]; then echo "cannot cd to $basedir" exit 1 fi elif [ -f "$basedir" ]; then cd "`dirname $basedir`" file="`basename $basedir`" echo "pwd is `pwd`" conv "$file" exit 0 else echo "parameters are invalid" exit 1 fi fi
1 comment:
Thank you for sharing this knowledge in a blogpost
http://hadooptraininginhyderabad.co.in/
Post a Comment