View Single Post
  #6 (permalink)  
Old May 23rd 15, 05:23 PM posted to uk.comp.os.linux,uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default Flac and Audio CD Health Checks

In article
wwvzj4vnuuk.fsf@l1AntVDjLrnP7Td3DQJ8ynzIq3lJMueXf 87AxnpFoA.invalid,
Richard Kettlewell wrote:
Jim Lesurf writes:
So what would you suggest in terms of a filing system address like
/run/user.... ? If your answer is "none of them" then I will stick
with what suits me and leave others to do what they prefer. But if
there is a common and recommended 'location', I can use it.


As I said, use $TMPDIR if set, otherwise use /tmp. It's a standard
location for temporary files and is often a tmpfs.


I'll need to unpack that because of my ignorance.

My mint laptop (for example) has /tmp. But 'df' doesn't list it, so does
that mean its on the main SDD simply as a directory. i.e. *not* a tempfs
(or ramfs) on ram?

If you want your own /tmp to be a tmpfs, do that.


That I don't currently know how to do. Nor do I know if it might give a
problem for something else. There are already two directories inside /tmp.


If you want a guarantee that your program will always have a tmpfs
available at some predictable location: sorry, you can't have one.


I take it that by "can't" what you really mean is that "the user would have
to be willing to create one. Which in turn means I'd have to explain /
request that *if* I wanted them to use a tempfs"?

However I think I pointed out that I'm not saying they must have this. All
I've done with the new version of the program is allowed the user to
specify where the tempfiles will go. And by default this will be as before
- inside the actual application's directory. Personally, I will go on to
prefer a ram based tempfs, but others can easily do otherwise.

As I've said, I'll try to learn about pipes, etc. And I may change
when I learn more. But the reality here at present is that what I've
done seems to work nicely for my purposes. And I thought one of the
strengths of Linux is that we can each use the system as we prefer.


You can do what you like, as I believe I've already said. But if you
want your program to integrate well with other people's systems, there
are right and wrong ways to go about it.


It seems reasonable to me to give them the choice to do what they prefer.
That's what my new version does.

However for myself (and as a suggestion to others) it seems to me to make
sense to use tempfs for this program's purpose.

Neither of the above seem "wrong" to me. But others can choose what they
want.

To go on...

I've found that I can do something like

sudo mkdir -p /mnt/tmp

followed by

sudo -t tmpfs -o size=20m tmpfs /mnt/tmp

to create a temporary 20meg 'ram disc' mounted at /mnt/tmp

Is that a more sensible option for me (and others who want to get the speed
and avoid disc wear) to employ?

I've noticed that the /mnt/tmp then persists being listed over a power
cycle, but the mounting/creation of the 20meg tmpfs space seems to be
needed after each bootup. So on from that, I assume I'd need to add
something appropriate to fstab if I want to avoid having to do that every
time?

Again, does that not seem reasonable?

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html