FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 01-22-2009, 07:38 PM
Frank Cox
 
Default OT? File order on CentOS/Samba server

On Thu, 22 Jan 2009 20:28:41 +0000
Miguel Medalha wrote:

> My question is: how is the order of files determined by Linux when a
> particular order is not explicitly required by a program?

http://www.linuxforums.org/forum/linux-newbie/111044-change-order-files-directory.html

I have no idea if the script posted there works or not but I found that with a
quick google search.

--
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
DRY CLEANER BUSINESS FOR SALE ~ http://www.canadadrycleanerforsale.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 07:46 PM
Miguel Medalha
 
Default OT? File order on CentOS/Samba server

> http://www.linuxforums.org/forum/linux-newbie/111044-change-order-files-directory.htm
I searched Google too, and I read that page. That doesn't work for us:
the Windows users won't touch anything on the server (or Linux, for that
matter) and I am not there every day. The file names change constantly.
I cannot use a cron job because the time at wich the original files are
ready is not always the same. This is a newspaper and closure time is
very, very busy. When the issue is ready, they proceed to the process I
described.

Thank you for answering.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 07:53 PM
Frank Cox
 
Default OT? File order on CentOS/Samba server

On Thu, 22 Jan 2009 20:46:29 +0000
Miguel Medalha wrote:

> I searched Google too, and I read that page. That doesn't work for us:
> the Windows users won't touch anything on the server (or Linux, for that
> matter) and I am not there every day.

The Windows users wouldn't have to know that they are "touching" anything on
the server. If that script will in fact work and getting it to run at the
appropriate time is the only problem, then set up something from the Windows box
to trigger it on your server. "Click the pretty icon right here". The pretty
icon can set a flag or something on the server that your cron job can check for
and run if present.

--
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
DRY CLEANER BUSINESS FOR SALE ~ http://www.canadadrycleanerforsale.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 08:31 PM
Les Mikesell
 
Default OT? File order on CentOS/Samba server

Miguel Medalha wrote:
> I hope someone familiar with the way Linux processes files can enlighten
> me on the following:
>
> I recently replaced an old Windows 2000 server with a new machine
> running CentOS 5.2. It uses Samba 3.2.7 to serve a network of Windows XP
> clients.
>
> We are a newspaper. We use Acrobat Distiller to batch-convert a folder
> of single-page PostScript files (for print) to a multipage PDF file (for
> electronic distribution).
> Running on a workstation, Distiller watches the folder on a Samba share
> and does the conversion, automatically creating bookmarks, indexes and
> other information.
>
> On the Windows server, Distiller processes the files by filename order:
>
> M09010901A001C.ps
> M09010901A002C.ps
> M09010901A003C.ps
>
> ... and so on.
>
> On the Linux server, Distiller processes the files in an order that
> seems arbitrary, for example:
>
> M09010901A021C.ps
> M09010901A005C.ps
> M09010901A015C.ps
>
> ... and so on.
>
> The order Distiller uses is NOT related to the time stamp of the files.
> I tried to copy the files to the watched folder one by one in the
> correct order; the result is the same.

Programs that read directories on their own normally find files in the
order that they happen to appear in the directory. In a newly created
directory, that would likely be in the order that the files were added,
but in existing directories, slots previously used and now free may be
reused in any order and this may not be consistent across filesystem
types. If you are processing on the linux side and not via samba, and
your program will take a list of files on the command line instead of
groveling through the directory itself, you might simply start it with a
wild-card filename on the command line. The shell will sort the list as
it expands it so programs see the sorted list.

> There is a workaround to this: use the runfilex script that comes with
> Acrobat: it can contain a list of files to convert, in the order you
> want. Unfortunately, this is not acceptable for us since the process
> then takes about 40 minutes (irrespective of platform or filesystem),
> instead of 3 or 4 minutes.

That's very strange. Maybe you should look for a different tool. Won't
ghostscript/psutils or OOo do this?

--
Les Mikesell
lesmikesell@gmail.com

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 09:06 PM
John R Pierce
 
Default OT? File order on CentOS/Samba server

Miguel Medalha wrote:
> I hope someone familiar with the way Linux processes files can enlighten
> me on the following:
> ...
> On the Windows server, Distiller processes the files by filename order:
>
> M09010901A001C.ps
> M09010901A002C.ps
> M09010901A003C.ps
>

Windows NTFS uses B-Tree for its directories so they are inherently
alphabetically sorted.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 09:28 PM
"William L. Maltby"
 
Default OT? File order on CentOS/Samba server

On Thu, 2009-01-22 at 14:06 -0800, John R Pierce wrote:
> Miguel Medalha wrote:
> > I hope someone familiar with the way Linux processes files can enlighten
> > me on the following:
> > ...
> > On the Windows server, Distiller processes the files by filename order:
> >
> > M09010901A001C.ps
> > M09010901A002C.ps
> > M09010901A003C.ps
> >
>
> Windows NTFS uses B-Tree for its directories so they are inherently
> alphabetically sorted.

If the linux FS is efs2, maybe the "dir_index" option of mke2fs will doo
what you want? See "man mke2fs". It says it uses hashed b-trees, but for
speed.

> <snip>

HTH
--
Bill

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 09:31 PM
Craig White
 
Default OT? File order on CentOS/Samba server

On Thu, 2009-01-22 at 20:28 +0000, Miguel Medalha wrote:
> I hope someone familiar with the way Linux processes files can enlighten
> me on the following:
>
> I recently replaced an old Windows 2000 server with a new machine
> running CentOS 5.2. It uses Samba 3.2.7 to serve a network of Windows XP
> clients.
>
> We are a newspaper. We use Acrobat Distiller to batch-convert a folder
> of single-page PostScript files (for print) to a multipage PDF file (for
> electronic distribution).
> Running on a workstation, Distiller watches the folder on a Samba share
> and does the conversion, automatically creating bookmarks, indexes and
> other information.
>
> On the Windows server, Distiller processes the files by filename order:
>
> M09010901A001C.ps
> M09010901A002C.ps
> M09010901A003C.ps
>
> ... and so on.
>
> On the Linux server, Distiller processes the files in an order that
> seems arbitrary, for example:
>
> M09010901A021C.ps
> M09010901A005C.ps
> M09010901A015C.ps
>
> ... and so on.
>
> The order Distiller uses is NOT related to the time stamp of the files.
> I tried to copy the files to the watched folder one by one in the
> correct order; the result is the same.
>
> This creates the need to open the final PDF and reshuffle the pages by
> hand, which is very time consuming and prone to error.
>
> There is a workaround to this: use the runfilex script that comes with
> Acrobat: it can contain a list of files to convert, in the order you
> want. Unfortunately, this is not acceptable for us since the process
> then takes about 40 minutes (irrespective of platform or filesystem),
> instead of 3 or 4 minutes.
>
> My question is: how is the order of files determined by Linux when a
> particular order is not explicitly required by a program?
>
> I noted the following:
>
> I have 4 files in a folder: file1.ps, file2.ps, file3.ps, file4.ps. When
> I order them by date, they appear in Windows Explorer in, say, the
> following order: 3, 4, 1, 2
> If I copy them to a new folder one by one in the order 1, 2, 3, 4, they
> will still appear in the order 3, 4, 1, 2 when ordered by date. So, what
> information is transported with the files that makes the Linux server
> present them to the world in this order?
>
> Does someone know a workaround to this situation or can someone point me
> to information about file ordering with Linux? By the way, I am using
> the EXT3 file system. I tried the same on a VFAT file system and the
> result is the same. It seems to be a Linux thing, not a file system thing.
----
You might want to look closely at the file names in Linux.

Windows is not case sensitive but Linux is.

In Windows, you cannot create the 2 files, TEST.DOC and test.doc in the
same directory but in Linux you can. It may be that some of these files
are stored differently as in file1.ps and FILE2.PS etc.

Also, you might want to check out some alternate settings...


dos filemode = yes (Share setting only)
case sensitive = no (share setting only)
default case = lower (share setting only)

Craig

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 09:49 PM
Miguel Medalha
 
Default OT? File order on CentOS/Samba server

> The Windows users wouldn't have to know that they are "touching" anything on
> the server. If that script will in fact work and getting it to run at the
> appropriate time is the only problem, then set up something from the Windows box
> to trigger it on your server. "Click the pretty icon right here". The pretty
> icon can set a flag or something on the server that your cron job can check for
> and run if present.
>
>
Ok, that's a good tip. I can investigate that. Thank you.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 10:00 PM
Miguel Medalha
 
Default OT? File order on CentOS/Samba server

> If you are processing on the linux side and not via samba, and
> your program will take a list of files on the command line instead of
> groveling through the directory itself, you might simply start it with a
> wild-card filename on the command line. The shell will sort the list as
> it expands it so programs see the sorted list.
>
>
The processing is done via Samba. Acrobat Distiller is not simply
processing a list of files, it is consolidating a group of files onto a
single file, discarding repeated graphic objects and creating a single
subset of fonts from the various font subsets present on the original pages.

>> There is a workaround to this: use the runfilex script that comes with
>> Acrobat: it can contain a list of files to convert, in the order you
>> want. Unfortunately, this is not acceptable for us since the process
>> then takes about 40 minutes (irrespective of platform or filesystem),
>> instead of 3 or 4 minutes.
>>
>
> That's very strange. Maybe you should look for a different tool. Won't
> ghostscript/psutils or OOo do this?
>
The tools you quote do not apply in this case. I am not talking about
office style PDFs, I am talking about full professional PDFs for
printing presses, with embedded color profiles such as ISO Newspaper,
JPEG2000 compression, bicubic resampling, etc. Not even Ghostscript does
that kind of thing. I wish it did, but it doesn't.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-22-2009, 10:01 PM
Miguel Medalha
 
Default OT? File order on CentOS/Samba server

> If the linux FS is efs2, maybe the "dir_index" option of mke2fs will doo
> what you want? See "man mke2fs". It says it uses hashed b-trees, but for
> speed.
>
That is the kind of information I am looking for. Thank you!
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 04:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org