Re: add another hard disk on Fedora Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim:
>> Thanks, most informative...  I keep meaning to look into some of these
>> things, but don't seem to get around to it.  For instance, the output of
>> some commands isn't described.  It's obvious what some of the columns
>> refer to in the output from ls (file names, permissions, etc.), but
>> there's a few things in there I hadn't figured out.


James Wilkinson:
> info ls

I keep forgetting about "info" files for some things that already have a
"man" file (they're not always the same document in a different format).
Though it still doesn't let me know if I can do one thing that I'd like
to be able to do:  Format the output of ls in a specialised way.  The
"ls" info file is only a bit more informative than the man page.

For example, on ye olde Amiga, I could do a task like most of the
following, with one command line.  Only going as far as using a script
to add in extras around it.

Task:  Listing a directory of pictures, with the intention of making an
HTML index page with thumbnails, where you've one directory with the
full size pictures, another with identically named thumbnails, and
you're making a page that shows one (the thumbnails) and links to the
other (the full sizes).

I used to do it by using the list files command, but formatting the
output of the command to fit selected parts of it (filenames, and
perhaps dates) in-between other pre-supplied text.  Rather like the old
concatenation of strings in BASIC.

Running this list command with a directory name, once, would make a
webpage for the entire collection of files.  Going as far as making a
script with a few more commands just tidied up the thing (headings,
footers, etc.).

Pseudo code example:

list inputfilepath "<a href='/images/" + outputfilename + "' title=' + outputfiledate +'><img src='/thumbnails/" + outputfilename + "'></a>" >> index.html

I presume that explains the sort of thing I'm trying to do in an
understandable manner.

But I'm damned if I can think of a simple way of doing the same sort of
thing in Linux.  I've looked at the "ls" documentation, and various
add-ons for Apache, etc.  I can't see a way of using ls (directly), and
gallery programs for Apache often make incredibly complex, and malformed
HTML, or just really bad tables of images, etc.  i.e. They don't work in
the way I want.

It's a relatively simple task, but I gave up trying to do it, for want
of a starting point to how to do that sort of thing.  I imagine I'll
have to do it by listing the directory, with and output of only
filenames, one per line, then parsing the output with something else to
add the extra bits.  Though I don't have a starting point to figure out
how to do that.

> or
> pinfo ls
> dd
> should give you more information.

"dd"?

-- 
Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux