This seems to work,
Apparently the /b flag opens the program in the same console. I guess that means that mintty inherits the change. If I run this bat and enter "echo $PATH" in the terminal I get,
It appears as if the cygwin directories are in the path ( /usr/local/bin:/usr/bin: ). I have no real way of knowing if the is the correct /usr/local/bin since cygwin has truncated the path names.
The problem is that if I start a terminal from the normal shortcut (not using the bat file above) I get the same information when I echo $PATH. I also don't know if I need to start every terminal and every program from such a bat file.
I think it might make more sense to have the cygwin1 install location always be in the path as an environment variable since that is the one I use most often. If I need the cygwin2 install, I would need to run a bat file that would remove the cygwin1 install location from that path and then insert the cygwin2 install location for that session only.
I did a search and found lots of questions/comments about how a dos script could execute Unix but not the other way round. If it's possible, I'd like the link to a post/site that would show me the way.
Thanks. (4 Replies)
when i run in dos for example:
C: ls /temp
ls: cannot access /temp: No such file or directory
but when i run
C: ls \temp
windriver backup remotebackup
also when i run
C: ls temp
windriver backup remotebackup
The problems that i have all developpers scripts was written first like this... (0 Replies)
Hello ;
I have a problem running some script on dos .
when i run :
C: ls /temp
ls: cannot access /temp: No such file or directory
but when i run
C: ls \temp
windriver backup remotebackup
also when i run
C: ls temp
windriver backup remotebackup
The... (4 Replies)
Hi guys,
I need a *.bat to run a ksh file in the shell on Windows NT...nothing more :) How do I do it? I tried with the following but it failed:
set INFORMIXDIR=D:\user-applications\informix
set PATH=%INFORMIXDIR%;%PATH%
D:\user-applications\MKS\mksnt\sh.exe C:\hk_9.2\C3_weekly_auto.ksh... (4 Replies)
Hi,
(Apologies, I'm sure I'm not the first person to raise this question but so far in my searches haven't found a good answer).
I would like to output a listing per line of filename (including full path) and 'last updated' timestamp. e.g:
Z:\dir1\file1.txt 01/02/2010 10:43... (5 Replies)
1. What I am doing?
Building a DOS .bat file that will root my Droid 2 phone using adb commands in the .bat file. (Just for the fun of it and to help me learn "stuff".)
2. Problem:
Here are the problem steps to accomplish this task manually in an adb shell:
adb shell (Prompt is $)
cd... (2 Replies)
hi All, here is the problem: I'm not able to specify a PATH inside the user crontab file (/var/spool/cron/crontabs). The only syntax it accepts is the usual "* * * * * file" I'm not able to add PATH, or HOME, or MAILTO, or anything else. when I try to save the crontab, I have the error: ... (1 Reply)
I need to put/get files from Windows machine to Unix machine and vice-versa.
I wrote a text file "ftp1.txt" as below.
naga
naga06
cd /root/Naga
prom off
get time.unl
bye
I wrote another bat file "ftp.bat" as below.
ftp -n -s:C:\Users\Naga\Desktop\ftp1.txt IP_ADDRESS
but... (2 Replies)
Well I have a lot of scripts that require dragging and dropping files in order to define Source files etc.
However more often then not it is the case that the path to said file contains NUMEROUS spaces.
I know one way to evade this problem is to encase the path in Quotes like this:
... (7 Replies)
I'm curious to know how do I add an empty log file (test1.log) to an existing text file to monitor all the changes made to a.txt.
Is this expression
export PATH=$PATH:/home/test1.log
right to be added to the text file a.txt? (5 Replies)
Discussion started by: TestKing
5 Replies
LEARN ABOUT SUSE
ntfscp
NTFSCP(8) System Manager's Manual NTFSCP(8)NAME
ntfscp - overwrite file on an NTFS volume.
SYNOPSIS
ntfscp [options] device source_file destination
DESCRIPTION
ntfscp will overwrite file on an NTFS volume. At present ntfscp can't create new files. destination can be either file or directory. In
case if destination is directory specified by name then source_file is copied into this directory, in case if destination is directory and
specified by inode number then unnamed data attribute is created for this inode and source_file is copied into it (WARNING: it's unusual to
have unnamed data streams in the directories, think twice before specifying directory by inode number).
OPTIONS
Below is a summary of all the options that ntfscp accepts. Nearly all options have two equivalent names. The short name is preceded by -
and the long name is preceded by --. Any single letter options, that don't take an argument, can be combined into a single command, e.g.
-fv is equivalent to -f -v. Long named options can be abbreviated to any unique prefix of their name.
-a, --attribute NUM
Write to this attribute.
-i, --inode
Treat destination as inode number.
-N, --attr-name NAME
Write to attribute with this name.
-n, --no-action
Use this option to make a test run before doing the real copy operation. Volume will be opened read-only and no write will be done.
-f, --force
This will override some sensible defaults, such as not working with a mounted volume. Use this option with caution.
-h, --help
Show a list of options with a brief description of each one.
-q, --quiet
Suppress some debug/warning/error messages.
-V, --version
Show the version number, copyright and license ntfscp.
-v, --verbose
Display more debug/warning/error messages.
DATA STREAMS
All data on NTFS is stored in streams, which can have names. A file can have more than one data streams, but exactly one must have no name.
The size of a file is the size of its unnamed data stream. Usually when you don't specify stream name you are access to unnamed data
stream. If you want access to named data stream you need to add ":stream_name" to the filename. For example: by opening "some.mp3:artist"
you will open stream "artist" in "some.mp3". But windows usually prevent you from accessing to named data streams, so you need to use some
program like FAR or utils from cygwin to access named data streams.
EXAMPLES
Copy new_boot.ini from /home/user as boot.ini to the root of an /dev/hda1 NTFS volume:
ntfscp /dev/hda1 /home/user/new_boot.ini boot.ini
Copy myfile to C:somepathmyfile:stream (assume that /dev/hda1 letter in windows is C):
ntfscp -N stream /dev/hda1 myfile /some/path
BUGS
There are no known problems with ntfscp. If you find a bug please send an email describing the problem to the development team:
linux-ntfs-dev@lists.sourceforge.net
AUTHORS
ntfscp was written by Yura Pakhuchiy, with contributions from Anton Altaparmakov.
DEDICATION
With love to Marina Sapego.
AVAILABILITY
ntfscp is part of the ntfsprogs package and is available from:
http://www.linux-ntfs.org/content/view/19/37
The manual pages are available online at:
http://man.linux-ntfs.org/
SEE ALSO ntfsprogs(8)ntfsprogs 1.13.1 November 2005 NTFSCP(8)