Sponsored Content
Top Forums Shell Programming and Scripting Copying a files from a filter list and creating their associated parent directories Post 302418491 by panyam on Tuesday 4th of May 2010 12:09:14 PM
Old 05-04-2010
I was not sure of this , how ever googled and end up in the link:

How do I selectively copy files from a directory structure? :: Free Tech Support :: Ask Dave Taylor!

So , you can modify your "find" command something like this:

Code:
 
find /datafiles -mtime -1  | cpio -pavd DESTINATION_DIRECTORY

Let me know , if it worked out!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Backup script: Copying and removing directories based on list

I am writing a simple backup script, but I cannot figure out how to remove directories that are found in a list. For example: DONT_COPY=" .adobe/ .bin/google-earth " tar -zcvf - * --exclude=$DONT_COPY | openssl des3 -salt -k $1 | dd of=$(hostname)-$(date +%Y%m%d).tbz > COPIED Note that... (4 Replies)
Discussion started by: dotancohen
4 Replies

2. UNIX for Dummies Questions & Answers

List directories and sub directories recursively excluding files

Hi, Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process. I wanted to disply using a unix command all the directories recursively excluding files. I tried 'ls -FR' but that display files as... (3 Replies)
Discussion started by: pointers
3 Replies

3. Shell Programming and Scripting

Moving files from several directories into parent

I am fairly new to bash(but am proficient in C++), and have only completed a few simple scripts. This is my first script that I actually need to do a serious task. All of my audiobooks are stored in traditional MP3 format: Music/Artist/Album/*.mp3 (which in this case is... (0 Replies)
Discussion started by: gamendorf
0 Replies

4. UNIX for Dummies Questions & Answers

Creating named directories from a list of names

Hi There, I'm a competent computer user that is learning basic unix commands. This is a slightly hypothetical question (for now at least!) but I can see a need for doing something like this in the near future. So I recently learned this command mkdir foo{1..100} which of course create's... (4 Replies)
Discussion started by: lookslikejames
4 Replies

5. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

6. Shell Programming and Scripting

Copying the files after filter

Hi Guys, i want copy the all files another direcotry after filtering the command. and tried as like below...it's not working. ls -ltr|awk '{print $9}'|grep "images\|\.htm"|cp *.* /home/oracle Thanks (13 Replies)
Discussion started by: bmk
13 Replies

7. Shell Programming and Scripting

Copying data from files to directories

I have the following that I'd like to do: 1. I have split a file into separate files that I placed into the /tmp directory. These files are named F1 F2 F3 F4. 2. In addition, I have several directories which are alphabetized as dira dirb dirc dird. 3. I'd like to be able to copy F1 F2 F3 F4... (2 Replies)
Discussion started by: newbie2010
2 Replies

8. Shell Programming and Scripting

Copying files from parent directory only

Hello, Please can someone assist on a issue I am having. I want to find specific files in the parent directory only that have been modified over the last 2 days and copy them to another location. NOTE: The version of AIX I am using does not have MAXDEPTH. I have currently written the... (3 Replies)
Discussion started by: Dolph
3 Replies

9. Shell Programming and Scripting

Archiving and moving files into directories, creating directories, etc.

how can i move "dataName".sql.gz into a folder called 'database' and then move "$fileName".tar.gz * .htaccess into a folder called 'www' with the entire gzipped file being "$fileName".tar.gz? Is this doable or overly complex. so mydemo--2015-03-23-1500.tar.gz > database -... (5 Replies)
Discussion started by: wyclef
5 Replies

10. Shell Programming and Scripting

Copying files to directories based on first 6 character

guys, i did create a script but its too long, though it function the same. # cat nightlyscan.sh #!/usr/ksh deyt=`date +"%Y-%m-%d"` for i in `ls -lrt|grep $deyt|awk '{print $9}'` do cp -f $i /S1/Sophos/logger/ done # but i did not paste it all. this is the desired. (9 Replies)
Discussion started by: kenshinhimura
9 Replies
QT2KDOC(1)						     KDOC Documentation System							QT2KDOC(1)

NAME
qt2kdoc -- Generates cross-reference file suitable for use with KDOC from Qt Toolkit HTML documentation. SYNOPSIS
qt2kdoc [-u URL] [-o <destdir>] [-z] <path to qt html> DESCRIPTION
qt2kdoc generates a kdoc(1) cross-reference file from the classes.html file that is included with the Qt GUI Toolkit HTML documentation. The resulting file can be used to cross-reference documentation generated with KDOC for other classes with the Qt HTML documentation. OPTIONS
--url <url>, -u <url> The URL by which the Qt documentation can be accessed. This will allow other libraries to link to the Qt documentation. --outdir <path>, -o <path> The directory where the generated index file will be written. --compress, -z Compress the generated index with gzip. KDOC can read these compressed index files. EXAMPLES
qt2kdoc -u "http://www.mydomain/src/qthtml/" $HOME/web/src/qthtml ENVIRONMENT
KDOCLIBS If set, it is used as the default output path. It is overridden by the --outdir option. FILES
classes.html, functions.html The files from which information about the Qt library is read. They are parsed by qt2kdoc. qt.kdoc A kdoc(1) cross-reference file that will be generated by qt2kdoc and can be used to link documentation generated by kdoc with the Qt documentation. SEE ALSO
This script is a utility for kdoc(1). BUGS
Dependent on format of Qt documentation. AUTHOR
Sirtaj S. Kang <taj@kde.org>, 1998. 2.0a54 2002-03-18 QT2KDOC(1)
All times are GMT -4. The time now is 07:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy