01-19-2007
Thank you
Thank you, I ended up doing something like this.
Quote:
find . -mtime -1 -type f |\
while read file
do
cp -rp $file ../${AREA}/$file
done
I have been experimenting further, what if I needed to check for directories or found a new file in a subdirectory that did not exist outside my development directory. I tried dropping the type -f from the find but I keep getting weird results. At one point I had it putting everythign where it needed to be, but an additional copy of each file was also copied to the base directory of my source directory. Somehow I thought when I first decided on this that it would be a little easier.
Last edited by scotbuff; 01-19-2007 at 03:38 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hello! is there a way for me to use the chmod command to change permissions for several files all at once -based on the fact that these files were all most recently modified TODAY ?
I can't use a wildcard on their filenames because the filenames are varied. But I was hoping I could somehow do... (2 Replies)
Discussion started by: polka_friend
2 Replies
2. AIX
Hello, we are going through a restructoring of file systems and will need to copy the contents of one file system to another box, then a few days later copy it again. Is there a way on the second copy to only copy files that have changed? Thanks in advance (3 Replies)
Discussion started by: zuessh
3 Replies
3. UNIX for Dummies Questions & Answers
How do I find files those have been updated in the last 24 hours, sort them by size descending and then display the top of the long list? (6 Replies)
Discussion started by: shantanuo
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Can you guys tell me how do i find the most recently changed files, say an hour before, few hours before, a day before etc....
Thanks!!!! (3 Replies)
Discussion started by: raghu_shekar
3 Replies
5. Shell Programming and Scripting
Hi
I have the following files
A320_ZONAL_v24_-_AMM_Suffix_jess_2011-05-31.xls Jun 10 17:21
A320_ZONAL_v24_-_AMM_Suffix_jess_.xls Nov 10 17:21
A320_ZONAL_v24_-_AMM_Suffix_jess_2011-03-31.xls Nov 23 20:21
And I need only the more recent one using UNIX timestamp... (2 Replies)
Discussion started by: javeiregh
2 Replies
6. Shell Programming and Scripting
Number of files will get created in a folder automatically daily.. so i hav to delete the older files other than the recently added 5 files..
Could u help me through this..?? (5 Replies)
Discussion started by: shaal89
5 Replies
7. UNIX for Dummies Questions & Answers
Hi there, I am very new to unix and having trouble with a fairly simple statement:
cd /user
ls -t -c1 | sed -ne '11,$p' | mv xargs archive/
What I want the code to do is sort all files in a directory by timestamp, select all of the files after the 10th file, and then move those files... (3 Replies)
Discussion started by: DSIReady
3 Replies
8. UNIX for Dummies Questions & Answers
Hi there,
I have built up my own little "cloud" for my family as the amount of computers grows all day. By now we use 3 smartphones, 2 notebooks und 4 PCs, so this "home cloud" was made to store all personal data (photos, documents,...) and do a backup once in a while. It is running on a Ubuntu... (1 Reply)
Discussion started by: SebSnake
1 Replies
9. UNIX for Dummies Questions & Answers
Hi all, I am a bit of a beginner with shell scripting..
What I want to do is merge two drives, for example moving all data from X to Y.
If a file in X doesn't exist in Y, it will be moved there.
If a file in X also exists in Y, the most recently modified file will be moved to (or kept) in... (5 Replies)
Discussion started by: apocolapse
5 Replies
10. Shell Programming and Scripting
Hello,
I am attempting to find and copy the two most recently added files to a specific directory, that fit a specific format.
I was able to find the command to list the two most recently added files in directory: ls -1t | head -n 2 The command lists the two files names in a vertical list,... (11 Replies)
Discussion started by: mattkoz
11 Replies
VIDIR(1) VIDIR(1)
NAME
vidir - edit directory
SYNOPSIS
vidir [--verbose] [directory|file|-] ...
DESCRIPTION
vidir allows editing of the contents of a directory in a text editor. If no directory is specified, the current directory is edited.
When editing a directory, each item in the directory will appear on its own numbered line. These numbers are how vidir keeps track of what
items are changed. Delete lines to remove files from the directory, or edit filenames to rename files. You can also switch pairs of numbers
to swap filenames.
Note that if "-" is specified as the directory to edit, it reads a list of filenames from stdin and displays those for editing.
Alternatively, a list of files can be specified on the command line.
OPTIONS
-v, --verbose
Verbosely display the actions taken by the program.
EXAMPLES
vidir
vidir *.jpeg
Typical uses.
find | vidir -
Edit subdirectory contents too. To delete subdirectories, delete all their contents and the subdirectory itself in the editor.
find -type f | vidir -
Edit all files under the current directory and subdirectories.
ENVIRONMENT VARIABLES
EDITOR
Editor to use.
VISUAL
Also supported to determine what editor to use.
AUTHOR
Copyright 2006 by Joey Hess <joey@kitenet.net>
Licensed under the GNU GPL.
moreutils 2010-04-28 VIDIR(1)