The following example script checks to see if the archive (destination) folder exists; if not, it creates it.
Then it copies the files in the directory (that are called file*) to the archive folder (it displays them on the screen as it does it).
Finally, it lists the files that are now in the archive folder.
If you only want to copy certain files, it would be in that middle section where you could restrict the files to copy - for example for zf in [X-Z].txt
to copy X.txt and Y.txt and Z.txt files.
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Hi all,
I'd very grateful for some help with the following:
I have a directory with several subdirectories with files in them. All files are named different, even between different subdirectories. I also have a list with some of those file names in a txt file (without the path, just the file... (5 Replies)
Hi,
I have a directory which is having many files. I want to copy 10files at a time to another directory.
For example.
First 10 files to one directory, then next 10 files to another directory and so on.
Please let me know if any work around there for it.
Thanks (4 Replies)
Dear Members,
I have a list of xml files like
abc.xml.table
prq.xml.table
...
..
.
in a txt file.
Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file.
Please help me with the script or command to do so.
... (11 Replies)
Hello Comunity
I am trying to make a bash shell script that it copies files and subdirs(with files) to a new dir. I would like the dest_dir to contain only subdirectories with files not other subdirs inside.
it called : cpflatdir src_dir dest_dir
Pleaze help me!
Thank you in... (2 Replies)
I am very new to unix as well as shell scripting.
I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file
Please help me in this regard and many thanks in advance. (3 Replies)
Hi, I am a unix newbie.I need to write a shell script to move my oracle READ WRITE datafiles from one serevr to another. I need to move it from /u01/oradata/W1KK/.. to /u01/oradata/W2KK,
/u02/oradata/W1KK/.. to /u02/oradata/W2KK.
That is, I actaully am moving my datafiles from one database to... (2 Replies)
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Hi ,
I want to copy files from one dir to anothe dir and check if destination dir exists ,if not exist ,has to create but when executing the below schell script ,the destination directory not exist and exit the shell script.
#!/bin/sh
src_path=/home/owngdw/abc
tgt_path=/home/owngdw/abc/xyz
if... (6 Replies)
Hi,
I have a script that can only handLE limited number of input files.
I need to be able to write a command (or a script) that:
1> copies N number of files from one directory (A) to another (B).
2> Files that are moved need to be renamed.
3> Files picked to be moved have... (1 Reply)