commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
What's wrong with this?
Pass the files path to finfo(), can be unix path, dos path, relative or absolute. The file is converted into an absolute nix path, then checked to see if it is in-fact a regular/existing file. Then converted into an absolute windows path and sent to "wmic". Then magic, you have windows file details right in the terminal. Uses: cygwin, cygpath, sed, and awk. Needs Windows WMI "wmic.exe" to be operational. The output is corrected for easy...
finfo "/cygdrive/c/Program Files/notepad.exe"
This alternative either opens the current working directory by just issuing the open function in the commandline. Or you can specify what directory you would like to open.
Example: open /cygdrive/c/Windows
Usage: open [path]
When no option is specified it will open the current working directory
This executes faster than
I put this in a script and added it to my path:
cat `which explore.sh`
if [ $# -eq 0 ]; then
explorer.exe $( cygpath `pwd` -w ) &
explorer.exe $( cygpath $1 -w ) &
Using the script you just type
Note: you can do this for any file that has an associated executable in the windows registry. This is quite handy if you want to open pictures or movies from xterm.