I need to do something easy but I can't seem to figure out how to do this.
Let's say I have 6 files in the directory below:
/ebsbeta_f/flash/EBSUATQB/onlinelog
o1_mf_6_55klt7nr_.log
o1_mf_3_55klskj4_.log
o1_mf_4_55klsrl1_.log
o1_mf_5_55klt09p_.log
o1_mf_2_55klv1ts_.log
o1_mf_1_55kmbl9l_.log
And I would like to move and rename these to /ebssand/oradata
o1_mf_6_55klt7nr_.log -> log06.dbf
o1_mf_3_55klskj4_.log -> log03.dbf
o1_mf_4_55klsrl1_.log -> log04.dbf
o1_mf_5_55klt09p_.log -> log05.dbf
o1_mf_2_55klv1ts_.log -> log02.dbf
o1_mf_1_55kmbl9l_.log -> log01.dbf
I know I can create a manual script $ mv a b, but I would like to know how I can automate this with a wrapper that read the source files and moves&renames these to the destination location in case more files are added to this list.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
cp: /ebssand/oradata/log00.dbf: The file access permissions do not allow the specified action.
---------- Post updated at 02:58 PM ---------- Previous update was at 02:43 PM ----------
One more question (and I thought I could figure it out on my own using your code but I can't ):
Let's say I want to copy - without renaming - the following 3 files: /ebsbeta/oradata/cntrl01.dbf, /ebsbeta/oradata/cntrl02.dbf, /ebsbeta/oradata/cntrl03.dbf to /overflow. How can I make a loop to copy any cntrl* files?