Terminal Commands to Order Files in a Directory
iMac G5 and iBook G3 (10 yrs. old!), Mac OS X (10.4.11)
iMac G5 and iBook G3 (10 yrs. old!), Mac OS X (10.4.11)
man ls
ls -t # sort by modification time (mtime)
ls -c # sort by change time (ctime)
ls -u # sort by access time (atime)
ls -U # sort by creating time (Mac specific)
ls -A # include all hidden files except . and ..
ls -f # display exactly the way they are stored in directory
ls -S # sort by size
ls -r # reverse the sort order
man sort
ls | sort # sort alphabetical
ls | sort -n # sort numeric
ls | sort -f # ignore case alphabetical sort
ls | sort -r # reverse the sort order
ls -f # display files in the order they are stored in the directory
zip -@ archive.zip <file.with.a.list.of.files.with.one.file.per.line
Fabe wrote:
To everyone - thank you. It is taking me a long time to work through this. It's like changing the crankshaft on my car engine after watching an episode of HorsePower TV. From what I've learned elsewhere, there are also issues of eliminating bits & bytes of extra data. E-gads.
Fabe wrote:
"Just curious, does this mean, it didn't work or you did give up? and what issues... do you mean? "
Obj-D - It means I haven't succeeded at my goal. The failure is one of implementation not instruction. I am a WYSIWYG computer user lost in the Terminal world of command lines. (The last time I dealt with command line instruction, CPM was the dominate OS.)
I am building an e-book from scratch. The final file has the extension .epub. It is a .zip file in disguise. In that zip archive is a folder containing three items, a file and two folders. Each is constructed and named a certain way. Let's call them A, B, C. The file is B. The rules say file B must be the first file in the folder's directory.
I have no idea how to do that. Several source pointed to Terminal and command lines. Hence my original question.
It appears, but I cannot confirm, Window users do this more easily than Mac users. Mac adds characters to names and files (so I'm told) that my end product does not want.
When I run a validator on my files they are always rejected. Is anyone here specifically working on .epub creation?
Fabe wrote:
No, I haven't tried it because I am a novice and fear I may end up wrecking my computer's data.
Terminal Commands to Order Files in a Directory