ClientAlive
April 14th, 2011, 05:24 PM
Hi,
I'm pretty new to Linux and have been following a book to help me learn the command line. Recently I read about two commands:
cp
and
cp -i
I don't understand why anyone would want to use just "cp" since you could accidentally do something you would regret.
I was thinking it would be good to make a shell script that makes "cp" equal to "cp -i" so that if I ever forgot to include the "-i" it would save my but.
If this line of thinking seems wrong to you please tell me its wrong and I'll forget it. I don't have as much experience as you do; and, just because something seems good to me doesn't mean it is.
Otherwise I was hoping to get the code to make the shell script.
Also: there might be other things like this that I don't know about but would really save my but if I forgot to modify the command. But not if its way too much stuff please. I can understand simple things now like "cp" and "mkdir" and "rmdir", etc but some things would be way over my head.
Thanks
Jake
I'm pretty new to Linux and have been following a book to help me learn the command line. Recently I read about two commands:
cp
and
cp -i
I don't understand why anyone would want to use just "cp" since you could accidentally do something you would regret.
I was thinking it would be good to make a shell script that makes "cp" equal to "cp -i" so that if I ever forgot to include the "-i" it would save my but.
If this line of thinking seems wrong to you please tell me its wrong and I'll forget it. I don't have as much experience as you do; and, just because something seems good to me doesn't mean it is.
Otherwise I was hoping to get the code to make the shell script.
Also: there might be other things like this that I don't know about but would really save my but if I forgot to modify the command. But not if its way too much stuff please. I can understand simple things now like "cp" and "mkdir" and "rmdir", etc but some things would be way over my head.
Thanks
Jake