User:Oleg Kobchenko/Nut Shell

From J Wiki
Jump to: navigation, search

Life saver little shell scripts

Windows

Register all DLLs in a folder:: for %c in (*.dll) do regsvr32 /s %c add /u to unregister

Unix

Extract tar:: tar -xzf file.tar.gz current folder as root of expansion

Symbol link all DLLs in a folder:: for X in *.so.*; do ln -s $X ${X/.0.0/}; done
will create libexpr.so.3 -> libexpr.so.3.0.0 links

Unwind symbolic links::

$ file /usr/lib/libOSMesa.so*
/usr/lib/libOSMesa.so:     symbolic link to `libOSMesa.so.4.0'
/usr/lib/libOSMesa.so.4:   symbolic link to `libOSMesa.so.4.0'
List library dependencies:: ldd file         Linux 
otool -L file Mac

Symbol table:: nm -m -g file -m modules, -g externs

Mac

Share Drive:: cd ~/Public current folder as target
ln -s /Volumes/Drive same name sym-link created

Source: Share a Mac DVD drive to a Windows PC, macosxhints.com

See Also