Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Copy files in order of creation date Post 303004362 by officiallyme on Saturday 30th of September 2017 11:53:37 AM
Old 09-30-2017
There are some files that were created within seconds of each other. But most were created hours, days or months apart.
However, this does not seem to matter during the copying process because if I repeat the same command twice, the time of creation of the new files will differ.

So the same command gives different destination file order despite the same original files.

First run:
1
2
5
3
4
6

Second run:
2
3
1
5
6
4

But unlike the cp command, the ls always gives the same result for the original files.

That's why I was thinking of adding some kind of sleep command after each copied file because I'm guessing the problem is not the original sorting, but the speed of file creation. I just don't know how to do it.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Moving files based on creation date

Howdy, I'm trying to figure out how to move multiple files based on their creation date. If anyone can enlighten me it would be most appreciated!! Thanks! :D (1 Reply)
Discussion started by: dgoyea
1 Replies

2. UNIX for Dummies Questions & Answers

list of files in date order

Im on HP/UX and am trying to find the command like an ll but that will sort showing the most currently modified programs first. Can anyone help me with that? :cool: (2 Replies)
Discussion started by: Jeannine
2 Replies

3. UNIX for Dummies Questions & Answers

How do I organize a series of files in date order?

I'd like to ls a group of files in date order but I'm not sure what the commands would be. Can anyone help with this? (1 Reply)
Discussion started by: hedgehog001
1 Replies

4. Shell Programming and Scripting

Order files by create date

hi Is there a way to sort files in the order they were created ,and move them to another directory one by one ,oldest being the first to be moved. Thanks Arif (4 Replies)
Discussion started by: mab_arif16
4 Replies

5. Shell Programming and Scripting

Sorting Files by date and moving files in date order

I need to build a k shell script that will sort files in a directory where files appear like this "XXXX_2008021213.DAT. I need to sort by date in the filename and then move files by individual date to a working folder. concatenate the files in the working folder then start a process once... (2 Replies)
Discussion started by: rebel64
2 Replies

6. UNIX for Dummies Questions & Answers

Renaming files by changing date order

I'm looking for a simple solution to rename a batch of files. All of the files in this directory start with a date in the format mm.dd.yy followed by a space and then additional descriptive text. Example: 01.21.10 742 P.xlsx 02.24.09 730 Smith.xlsx The information following the date can... (3 Replies)
Discussion started by: kreisel
3 Replies

7. Shell Programming and Scripting

copy files based on creation timestamp

Dear friends.. I have the below listing of files under a directory in unix -rw-r--r-- 1 abc abc 263349631 Jun 1 11:18 CDLD_20110603032055.xml -rw-r--r-- 1 abc abc 267918241 Jun 1 11:21 CDLD_20110603032104.xml -rw-r--r-- 1 abc abc 257672513 Jun 3 10:41... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies

8. Shell Programming and Scripting

Script to copy creation date over top of modified date?

Can someone draw up a script that for every file, folder and subfolder and files that will copy the creation date over top of the modified date?? I know how to touch every file recursively, but no idea how to read a files creation date then use that to touch the modification date of that file,... (3 Replies)
Discussion started by: toysareforboys
3 Replies

9. Shell Programming and Scripting

Bash directory loop and order by creation date?

Hello, how in bash i can get directory loop and order by creation date? THX! :) #!/bin/bash for folder in /home/test/* do if ; then echo $folder; fi (12 Replies)
Discussion started by: ZerO13
12 Replies
htmerge(1)						      General Commands Manual							htmerge(1)

NAME
htmerge - create document index and word database for the ht://Dig search engine SYNOPSIS
htmerge [options] DESCRIPTION
Htmerge is used to create a document index and word database from the files that were created by htdig. These databases are then used by htsearch to perform the actual searched. OPTIONS
-a Use alternate work files. Tells htdig to append .work to database files, causing a second copy of the database to be built. This allows the original files to be used by htsearch during the indexing run. -c configfile Use the specified configfile instead of the default. -d Prevent the document index from being created. -s Print statistics about the document and word databases after htmerge has finished. -v Run in verbose mode. This will provide some hints as to the progress of the merge. This can be useful when running htmerge interac- tively since some parts (especially the word database creation) can take a very long time. -w Prevent the word database from being created. ENVIRONMENT
TMPDIR In addition to the command line options, the environment variable TMPDIR will be used to designate the directory where intermediate files are stored during the sorting process. FILES
/etc/htdig/htdig.conf The default configuration file. SEE ALSO
Please refer to the HTML pages (in the htdig-doc package) /usr/share/doc/htdig-doc/html/index.html and the manual pages htdig(1) and htsearch(1) for a detailed description of ht://Dig and its commands. AUTHOR
This manual page was written by Christian Schwarz, modified by Stijn de Bekker, based on the HTML documentation of ht://Dig. 21 July 1997 htmerge(1)
All times are GMT -4. The time now is 06:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy