Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Yadu Nand
http://www.java2s.com/Code/C/File/Copyafile.html Next time JFGI ;) Lol who is their right mind would want to google to find an alternative to cp ? I was thinking small stuff like cat file1 file2 save as new file in emacs/vi etc.. -- Regards, Yadu Nand B -- Freedom is the only law.

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Yadu Nand
Hi Srihari , touch destination.file cat source.filedestination.file I was writing the same command into mail :) -- Regards, Yadu Nand B -- Freedom is the only law. Freedom Unplugged http://www.ilug-tvm.org You received this message because you are subscribed to the Google Groups ilug-tvm

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Yadu Nand
Lol who is their right mind would want to google to find an alternative to cp ? A person who thinks, atleast for a minute before shooting out a mail to a mailing list. Maybe if you think so ... The point of me mailing was not to get an to cp, it was to get the opinion of everyone

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Rajiv Nair
I would like to request you to reply with different hacks as work-arounds . Please mail in possible ways and definitely the most shortest, longest and obfuscated types will definitely be appreciated. it was to get the opinion of everyone else about what the folks in our lab are doing. is a

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Ashik S
On Monday 11 January 2010 18:29:21 Yadu Nand wrote: Maybe if you think so ... The point of me mailing was not to get an to cp, it was to get the opinion of everyone else about what the folks in our lab are doing. I thought you were clueless about what to do to circumvent the situation.

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Yadu Nand
I thought you were clueless about what to do to circumvent the situation.  My first instinct would have been to write a program to get things done and then ask for opinions . Not quite so :) We have had this for some time ,found our way around it. But I thought I should mail it to the list

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Srihari k
more solutions ... : apropos copy -- Freedom is the only law. Freedom Unplugged http://www.ilug-tvm.org You received this message because you are subscribed to the Google Groups ilug-tvm group. To post to this group, send email to ilug-tvm@googlegroups.com To unsubscribe from this group, send

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Ershad K
Another solution :) #include fstream using namespace std; int main(int argc, char** argv) { ifstream input (argv[1]); ofstream output (argv[2]); char c; while (input) { input.get(c); output.put(c); }

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Ashik S
ershad, thats the spirit ! :) -- aashik Mandatory Quote: My one purpose in life is to serve as a warning to others. -- Jamie Zawinsky -- Freedom is the only law. Freedom Unplugged http://www.ilug-tvm.org You received this message because you are subscribed to the Google Groups ilug-tvm

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Yadu Nand
Hi Srihari, apropos copy Thanks a lot for that. It seemsinstall file_source file_destination not only copies but also sets executable permission for the destination file. :) -- Regards, Yadu Nand B -- Freedom is the only law. Freedom Unplugged http://www.ilug-tvm.org You received

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread Yadu Nand
Aashik, First useful python I have ever written :) Thanks to you. code #!/usr/bin/env python import sys,shutil if len(sys.argv) != 3: # only 2 args allowed sys.exit(Enter Source and Destination only) shutil.copyfile(sys.argv[1],sys.argv[2]) /code -- Regards, Yadu Nand B -- Freedom is

Re: [fsug-tvm] Someone disables cp command to prevent copying in lab

2010-01-11 Thread joseph varghese
On Mon, Jan 11, 2010 at 7:48 PM, Ashik S aash...@gmail.com wrote: ershad, thats the spirit ! :) -- aashik Mandatory Quote: My one purpose in life is to serve as a warning to others. -- Jamie Zawinsky -- Freedom is the only law. Freedom Unplugged http://www.ilug-tvm.org You