Sponsored Content
Full Discussion: cp - no to all option?
Top Forums UNIX for Dummies Questions & Answers cp - no to all option? Post 302085642 by td_kuoj3 on Friday 18th of August 2006 01:31:57 PM
Old 08-18-2006
OS: AIX 5.3

Let me restate my problem again.

i want to copy dirone to dirtwo, they're similiar, but there are some extra files in dirone that dirtwo doesn't have, going through them one by one takes way too long. So I use the following command to copy one directory to the second.

cp -R -h -i /dirone/* /dirtwo

I wanted -i in there because I do NOT want to overwrite, the directory is huge and i had to sit here pressing enter for 1.5 hours.

Now my question is, is there an option that is "no to all"?

Thanks, any help is much appreciated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

-h option

Hi what does the following mean in shell scripts (-h option) val contains a string. while (-h "$val") (1 Reply)
Discussion started by: Raom
1 Replies

2. UNIX for Advanced & Expert Users

su option

We have started to us the su option on our production server. We log in with our own id and then su into a special id to perform various tasks. This allows our actions to be monitored. I need to know how to use the su option when doing an ftp between two servers. I noticed that when I log into... (1 Reply)
Discussion started by: lesstjm
1 Replies

3. Programming

cc option

my yacc output file y.tab.c is not compiling using cc y.tab.c -ly command .possibily option flag -ly is not correct.i m using red hat linux 9.please give solutions. (4 Replies)
Discussion started by: kuldeep_bora
4 Replies

4. Shell Programming and Scripting

which is best searching option

Hi, I need one help for choosing best option among sed, perl and awk. I need to search and replace thousand files for a text and need to replace it. I am in confusion for choosing the option for best results. Because by using sed option its taking too much time for searching and replacing... (3 Replies)
Discussion started by: dbsurf
3 Replies

5. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

6. Programming

g++ and the -R option

hi everybody, can somebody tell me what -R option on g++ on solaris means : g++ -DAIX -fpic -static -o printps printps.o -L/epost2/blitz/xercesc1_1 /lib -L/oracle/OraHome/lib32/ L/epost2/blitz/lib -lxerces-c1_1 -lhmltods -lhmlt ops -lgeneric -lnotify -lutil -lclntsh `cat... (0 Replies)
Discussion started by: eternalflame
0 Replies

7. Shell Programming and Scripting

Can there be a better option?

Hello, I am still in the process of learning Shell Programming. The online manual, that I am referring to had following question: I made a script as follows: df --block-size=1GB | tr -s ' '| cut -d' ' -f2,5 | grep -v 1GB* | sort -k1,2n | tail -1 | cut -d' ' -f2 | cut -d '%' -f1 and it... (2 Replies)
Discussion started by: shahdharmit
2 Replies

8. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

9. Shell Programming and Scripting

-f option and -rf in rm

Hi, I'm new to shell scripting and I'm trying to read some code I need to use. Could you help me out on what it's doing? I read this as.... if the directory has files then rm all the files in that directory. I'm not sure.... if ; then run "rm -rf ${TSP_FILEPATH_PLUGIN_DIR}"; fi run... (8 Replies)
Discussion started by: jdilts
8 Replies

10. Solaris

Unrecognized option: sparc-sun-Solaris2.10/bin/as: unrecognized option `-m32'

Hi, I installed some packages required by an app built with python. But when I try python setup.py install, I get the following error: /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/../../../../sparc-sun-solaris2.10/bin/as: unrecognized option `-m32' Could anyone tell me what's wrong... (4 Replies)
Discussion started by: Kimkun
4 Replies
install(1)						      General Commands Manual							install(1)

NAME
install - Installs a command SYNOPSIS
install [-sS] [-c targetdir] [-g group] [-m mode] [-u owner] file [searchdir...] install [-osS] [-f targetdir] [-g group] [-m mode] [-u owner] file [searchdir...] install [-g group] [-iosS] [-m mode] [-n targetdir] [-u owner] file [searchdir...] install [-g group] [-MosS] [-m mode] [-u owner] file [searchdir...] The install command installs file in a specific place within a file system. It is most often used in makefiles. OPTIONS
Installs file in targetdir only if there is not already a copy there. If there is a copy of file in targetdir, the command issues a mes- sage to that effect and exits without overwriting the file. This option can be used alone or with the -g, -m, -s, -S, or -u options. Forces installation of file in targetdir even if a copy already exists there. If there is already a copy of file in targetdir, the command sets the new copy's mode and owner to those of the old copy. If there is not already a copy of file in targetdir, the command sets the mode to 755 and the owner to bin. This option can be used alone or with the -g, -m, -o, -s, -S, or -u options. Specifies a group other than bin for the destination file. Ignores the default directory search list. Searches for the file to be installed only in the directo- ries specified on the command line (searchdir ...). This option cannot be used with the -c, -f, or -M options. Moves file to targetdir instead of copying it. This option cannot be used with the -c, -f, -i, or -n options. Specifies a mode other than 755 for the destination file. Installs file in targetdir if there is no copy in any of the searched directories (searchdir ...). Sets the mode of the file to 755 and the owner to bin. This option cannot be used with the -c, -f, or -M options. Saves the old copy of file by renaming it OLDfile and leaving it in the directory where it was found. This option cannot be used with the -c option. Specifies an owner other than bin for the destination file. Suppresses the display of all but error messages. Causes the binary to be stripped after installation; see strip(1). DESCRIPTION
The install command copies (or moves) file into the appropriate directory, retaining the owner and permissions of the existing copy, if any. A newly created file has permission code 755, owner bin, and group bin. The install command writes a message telling you which files it is replacing or creating and where they are going. If you supply no options or search directories (searchdir ...), the install command searches the /bin, /usr/bin, /etc, /lib, and /usr/lib directories in that order for a file with the same name as file. The command overwrites the first matching file with file and issues a message indicating that it has done so. If no match is found, the command tells you and exits without taking further action. If any search directories (searchdir ...) are specified on the command line, the install command searches them before it searches the default directories. EXAMPLES
To replace a command that already exists in one of the default directories, enter: install fixit This replaces the file fixit if it is found in the /bin, /usr/bin, /etc, /lib, or /usr/lib directory. Otherwise, the file fixit is not installed. For example, if /usr/bin/fixit exists, then this file is replaced by a copy of the file fixit in the current direc- tory. To replace a command that already exists in a specified or default directory while preserving the old version, enter: install -o fixit /etc /usr/games This replaces the file fixit if it is found in the /etc or /usr/games directory, or in one of the default directories. Otherwise, the file fixit is not installed. If the file is replaced, the old version is preserved by renaming it OLDfixit in the directory in which it was found. To replace a command that already exists in a specified directory, enter: install -i fixit /u/judith/bin /u/bernice/bin /usr/games This replaces the file fixit if it is found in the /u/judith/bin, /u/bernice/bin, or /usr/games directory. Otherwise, the file is not installed. To replace a command found in a default directory, or install it in a specified directory if it is not found, enter: install -n /usr/bin fixit This replaces the file fixit if it is found in one of the default directories. If the file is not found, it is installed as /usr/bin/fixit. To install a new command, enter: install -c /usr/bin fixit This creates a new command by installing a copy of the fixit file as /usr/bin/fixit, but only if this file does not already exist. To install a command in a specified directory whether or not it already exists, enter: install -f /usr/bin -o -s fixit This forces the fixit file to be installed as /usr/bin/fixit whether or not /usr/bin/fixit already exists. The old version, if any, is preserved by renaming it to /usr/bin/OLDfixit (a result of the -o option). The messages that tell where the new command was installed are suppressed (a result of the -s option). SEE ALSO
Commands: chgrp(1), chmod(1), chown(1), cp(1), installbsd(1), make(1), mv(1), strip(1) install(1)
All times are GMT -4. The time now is 02:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy