LinuxQuestions.org - Blogs - SilversleevesXhttp://www.linuxquestions.org/questions/blog/silversleevesx-470023/
LinuxQuestions.org offers a free Linux forum where Linux newbies can ask questions and Linux experts can offer advice. Topics include security, installation, networking and much more.enTue, 03 Mar 2015 20:33:54 GMTvBulletin60https://lqo-thequestionsnetw.netdna-ssl.com/questions/images/misc/rss.jpgLinuxQuestions.org - Blogs - SilversleevesXhttp://www.linuxquestions.org/questions/blog/silversleevesx-470023/
http://www.linuxquestions.org/questions/blog.php?b=26835
Thu, 17 Nov 2011 23:31:40 GMTI started browsing the Web tonight looking to do something I had been doing in my Bash scripts with stat and three more lines of string cutting in...I started browsing the Web tonight looking to do something I had been doing in my Bash scripts with stat and three more lines of string cutting in one line instead.

I had been using stat -c &y file to get a file's modification date in scripts, but I have never liked the nine-digit "blink-of-an-eye" part of the return on that command. My method up till now has been to eliminate it with lines like these:

After reading this post, I looked at the (ostensibly generic) date manual page on linux.die.net, and skimmed through the other format flags, if that's the right name for them, to see if there were any that returned the time and UTC offset (again, not sure of my terms, but it sounds right). After a bit of trial and error, I came up with this code:

Code:

date -r foo.jpg "+%F %T %z"

which returns the date of a file in the same format as stat -c &y file does, but without that string of nine extra numbers, which reminds me of nothing so much as the real-time duration of some of the highest-numbered elements on the Periodic Table -- that is, when it's not all zeros.

I hope this gets spidered by the search engines. I'd love to help someone out with the above advice and tips, abstruse as they might be.

If the definition of insanity is doing the same thing twice (or more times) and expecting different results, then the question becomes: "Who's the more insane? The person who follows the advice, knowing in advance it probably won't make any difference or work out the way they want it to, or the person who, after reading lines like '(adding vertical refresh and horizontal sync rates for example)', 'as Google has been worse than useless every time I search for problems as detailled as these' and heavy hints on the like uselessness of Ubuntu Forum posts, goes ahead and gives the same 'works for the rest of us -- why don't you try it?' advice just about 'everyone else' gave them?"

If the definition of insanity is doing the same thing twice (or more times) and expecting different results, then the question becomes: "Who's the more insane? The person who follows the advice, knowing in advance it probably won't make any difference or work out the way they want it to, or the person who, after reading lines like '(adding vertical refresh and horizontal sync rates for example)', 'as Google has been worse than useless every time I search for problems as detailled as these' and heavy hints on the like uselessness of Ubuntu Forum posts, goes ahead and gives the same 'works for the rest of us -- why don't you try it?' advice just about 'everyone else' gave them?"

It's not really as if I were starting from point zero on this: I've been using a kind of code to mark files and orient them in my mind with certain sites, usually via the "lazy Yank method," as I call it, of abbreviating the name of the site. Whether it's the content provider's genuine pay-site server URL in the abbreviation really doesn't matter. I know there are two that go by different names than are read into my abbreviations, but after the first hundred files, I reckoned it would take too much effort -- and this using GUI apps -- to make the appropriate changes.

So today I used three apps to generate a list of the providers, and now it remains to come up with a simple, steady, reliable method of matching site-name (as abbreviated) with file name (on the JPEGs themselves). I've been doing this "by hand" using EXIV2 in BASH for almost a year now: I've thought of automating by way of command files before this, but what hung me up was the persistent thought that the site source for the greatest number of files has garnered four different abbreviations. That just seemed like too much work.

Recently I had a particularly lucky spate of downloading: over fifty pics a day in a quarter of as many hours, each day for three days in a row. Marking those up in BASH, I started to wonder exactly how much more work it really would be to puzzle out patterns in the file-names that could be logically matched with the provider site names, then come up with lists, command files and scripts to take some of the niggling shite-work off my own hands.

So that's the path I'm pursuing now -- finding patterns. I've compromised with myself by intending, only in this first real stage of streamlining, to make up files that will match those pics with the providers that are the "Fort Knoxes" of pron, as proven by the numbers of pics from each being significantly (in some cases geometrically) higher than all the rest.

Wish me luck.

BZT
]]>SilversleevesXhttp://www.linuxquestions.org/questions/blog/silversleevesx-470023/ambitious-definitely-3041/A Windows weaknesshttp://www.linuxquestions.org/questions/blog/silversleevesx-470023/a-windows-weakness-1968/
Tue, 19 May 2009 23:23:45 GMTThinking like a Mac-user again, I came up with this.
If, in Windows XP, the Desktop is, as it is in Mac OS X, a legitimate and discrete folder,...Thinking like a Mac-user again, I came up with this.

If, in Windows XP, the Desktop is, as it is in Mac OS X, a legitimate and discrete folder, then why, when one has "Command Prompt Here" and "Terminal Here" type patches to their context menu, is one unable to use them by simply right-clicking on some unoccupied space in the Explorer Desktop? Why, indeed, does one have to follow the monotonous path of "My Computer/C/Documents and Settings/[username]"*, click on the Desktop folder in that window, and then right-click to engage one of these shell-here add-ons?

This, I hold, is a weakness, a flaw, more proof that going it alone with a proprietary foundation for one's operating system, as if holding out for a happy ending that, friends, will never arrive, mark my words, makes Microsoft look even worse than they already do in the eyes of "bright people" (to borrow a turn of phrase from my Steve Jobs limerick).

If Mr Gates loves the Mac OS so much, as we heard almost once a year from the time of the beginning of M$'s DoJ troubles until well after Windows XP was rolled out, then perhaps he can concede that the wisdom of clicking to engage a shell prompt in a place where the contents of a folder are actually visible is a far more user-friendly way of going about the thing than insisting that the hypothetical user click where they can't see the contents.

Ah, me. Maybe the Net gods will be kind someday and drop a Mac Book Pro in my lap, if only to shut me the hell up.

BZT

*The Windows path delineation slash, or "whack", is a backwhack, so far as I am concerned. I don't use it unless I absolutely have to.
]]>SilversleevesXhttp://www.linuxquestions.org/questions/blog/silversleevesx-470023/a-windows-weakness-1968/http://www.linuxquestions.org/questions/blog.php?b=1954
Tue, 12 May 2009 12:56:22 GMTThis guy Jobs from north California
Has a fetish for Mach, though, I warn ya;
He may never believe
Someone ought to tell Steve
This is why bright...This guy Jobs from north California
Has a fetish for Mach, though, I warn ya;
He may never believe
Someone ought to tell Steve
This is why bright people scorn ya.

(Inspired partly by hearing that Linus Torvalds said he didn't like Mac OS X because Jobs had woven in his -- Linus's -- nemesis, the Mach microkernel. This isn't the first time Jobs has either overseen or damned the lifeboats to put Mach into an Apple product -- those who know, remember MKLinux.)

BZT
]]>SilversleevesXhttp://www.linuxquestions.org/questions/blog.php?b=1954http://www.linuxquestions.org/questions/blog.php?b=1953
Tue, 12 May 2009 12:43:03 GMTFrom a discussion of the "whether or nots" (Linux, Vista, Mac OS X) on one of the sub-forums:

Quote:

Originally Posted by SilversleevesX

I contrived two sayings that came directly from my experience of using the Mac OS (legacy and OS X).

When something wouldn't work, or wasn't as easy to do as it might have been in Windows or Linux, I'd say"That's the price of elegance."

When something worked flawlessly, could be done in one application or utility, or just looked excellent in its final form, then I'd say"That's the elegance of price."

And as for whether to "go with" Windows, Mac or Linux/Unix, I summed it up nine years ago with this phrase:"They all have about the same number of headaches -- just different flavors."