Flatten The Curve (MacOS) Mac OS

Posted on  by
  1. Flatten The Curve (macos) Mac Os Update
  2. What Are Advantages And Disadvantages Of MacOS - IT Release
  3. Creating Flat Packages In OSX – ShaneKirk.com

Clover has a completely different system of configuration with a decidedly steep learning curve. Download the Application from the Mac App Store using. Let me preface this answer by saying I’m an old git - I was around when Windows was still 3.x (and before that actually) and I worked for companies where our core product ran on DOS and maximising the amount of available RAM was a key skill - this. After starting FAF, drag the folder icon that you want to flatten onto the top popup menu of the window (where it lists your available disks). Then change the search to: Name - matches pattern -. The original Plague Inc: Evolved soundtrack, featuring all of the tracks from Plague Inc: Evolved as well as the music from the original Plague Inc. Game - including the haunting main theme, the paranoid notes of Neurax worm mind control and the aggressive style of the zombie-producing Necroa virus (plus a surprise bonus track!).

Flatten a directory structure 12 comments Create New Account
Flatten The Curve (MacOS) Mac OS
Click here to return to the 'Flatten a directory structure ' hint

If you don't own another Mac. If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc from the Apple Store or a reputable reseller— not from eBay or anything of the kind. If the machine is very old and has less than 1 GB of memory, you'll need to add more in.

The following comments are owned by whoever posted them. This site is not responsible for what they say.

My program Find Any File (http://apps.tempel.org/FindAnyFile/) can do that, too, for those who dislike the command line interface:
After starting FAF, drag the folder icon that you want to flatten onto the top popup menu of the window (where it lists your available disks).
Then change the search to:
Name - matches pattern - *
I.e, enter an asterisk in the text field.
Finally, press the Find button.
You'll get a Finder-like window listing all items in the folder, where you can then move, copy and perform other common tasks just like in the Finder.

Can't you just find items that are not folders by using 'NOT:folder' in the folder find window, and then copy/move those to the root of the folder you're searching/flattening.

To be safe, that 'cp' really should be 'cp -n' so you don't overwrite destination files with the same name. (eg: moving 1/foo.jpg 2/foo.jpg to the current directory would end up with just 2/foo.jpg as foo.jpg)
Another way to get all the files into the same dir is to change slashes to another character, like an underscore. Here's an example in bash: find . -type f sed 's/^.///' while read -r X ; do echo mv '${X}' '${X////_}' ; done ; # filesystem regex's always look wonky with slash delimiters
Yet another way to do massive renames like this is with one of my favorite perl scripts, prename. (You can find it by googling 'perl prename') With prename, you could flatten a two-level directory like this: prename 's^/^_^g' */* # perl and many others now allow you to use something other than a slash regex delimiter, which is useful for filesystem operation legibility

You're moving, he is copying, big difference.

You can do it in Finder too.
Just make a query such as Name matches ' in the directory where you want to start looking and it'll find everything.
So, in a Finder window, type Cmd+F and you end up with the search criteria bar showing Kind is Any.
Change that to Name matches ' (empty double quotes).
That's it. Do what you will with the files.

I am curious could something like exporting folders with names like year-month-date into a structure like year/month/data/datahere be possible and how.
---
I have my life with me but my heart is at home.

A basic approach would be to locate a folder (e.g. use ls if everything is at the same level, or find /the/path -type f if you wanted to find all subdirectories), parse out its name into 3 parts, YYYY, MM, DD (handling anything like having/not having a leading 0 to suit your needs). mkdir -p /wherever/$YYYY/$MM/$DD Then move or copy or link the files into that directory.
That assumes I understood the question correctly :)

Exactly what I've done many times. I think this has something to do with Finder, by default as far as I can remember, not searching the current directory and instead searching the entire mac. That setting is found in Finder Preferences > Advanced > 'When performing a search'. I always keep it to 'Search the current folder' and when that is set just searching in any Finder window searches that folder which then makes it simple to search for all files.
It is interesting to know there are multiple ways of doing things like the terminal command in the original hint or as I was thinking of AppleScript someone already posted a script to do just that. But I always believe the easiest way is the best way, which in this case is in spotlight in Finder already. The terminal and AppleScript of course have their advantage in automating those things.

This is of course also possible with an AppleScript: Just use it as is or modify it to your liking!

An interesting side effect of using 'ln' instead of 'cp' (really, you want 'cp -n' if you're going to take that approach) is that ln makes hard links instead of copies. Effectively, you get another pointer to the file's data, rather than a whole new copy of the file. In many cases, this is an advantage because hard linking is faster than copying, and you won't need nearly as much disk space to make a bunch of new hard links. On the other hand, if you wanted to flatten and then make changes to the flattened copy while leaving the originals alone, you'd definitely want to use 'cp -n' instead.

Flatten The Curve (macos) Mac Os Update

Actually, the find command can also execute a command on each file it finds - that's what the -exec option is for.
Also, I think there was a '.' missing in the original hint (the first argument to find is usually the directory where the search starts; after doing cd then you would want to start at the current directory).
Here is a shorter version (and, to my mind, clearer). Just replace (or set) $ROOT_DIRECTORY and $FLAT_DIRECTORY and run:
find $ROOT_DIRECTORY -type f -exec cp -n {} $FLAT_DIRECTORY ;
(the two braces {} are find's convention for the current found file; the semicolon ends the exec command and must be escaped to prevent the shell from interpreting it)

While I've sometimes used one-liners such as those being described here, I've all too often regretted it: A minor typo and files end up in the wrong place or with almost but not quite the intended names. And then you're left with coming up with a
new command to fix things up. (Even worse, your one-liner fails part way through, and you now have two different problems to solve: The original one for the remaining files, and a new one for the mis-directed files.)
Two approaches make this safer:
1. Don't get fancy with one-liners. Use find to generate a list of input files; then convert it into a list of shell commands to carry out the necessary actions. Finally, when you've looked everything over and are satisfied with it, feed the commands to a shell ($ sh <command-file).
You can build the list of commands using whatever tools are comfortable and appropriate: sed, cut/paste, awk, tr (handy for changing upper to lower case, or '/' to '_'), emacs, vi. Sometimes a mix of tools is best - e.g., sed to do most of the work, emacs to fix up a few special cases.

What Are Advantages And Disadvantages Of MacOS - IT Release


2. If you do use a one-liner, check it first. Easy approach: Put echo in front of the command that actually renames or moves files or in any other way changes stuff. That way, nothing is actually done but you can see the commands that would

Creating Flat Packages In OSX – ShaneKirk.com

have been executed. All too often, you'll find yourself feeling relief for not having 'let it rip' without testing.
Edited on Mar 18, '13 03:55:08AM by leichter

Let me be completely honest with you. I have a full-blown mouse fetish. I've owned every single major mouse model from Microsoft and Logitech since the bad old days of the original Microsoft 'Dove bar' mouse, and the Logitech MouseMan. I remember quite clearly bringing home my first mouse, an add-on for my Apple //c, and demonstrating this novel method of input to friends. I've been obsessing over these essential input devices since way before the days when USB was just a glint in Intel's collective eye; I have more than my share of mousing experience.

These days, I can't claim experience with every mouse under the sun; there are too many models out there. Mice have long since split into two distinct family trees: premium 'performance' mice for gamers and enthusiasts; less expensive vanilla models for everyone else. As an enthusiast and a gamer, I've followed the enthusiast mouse family tree with great gusto. My current mouse of choice is the Microsoft Habu. But that was way back in March. Since then two very interesting new models have emerged.

The Microsoft Sidewinder Mouse:

The Logitech G9 Mouse:

I've now used both models for a few days, long enough to generate some informed opinions. They do have a quite a few things in common, things I'd consider relatively standard for current generation enthusiast mice:

  • Five buttons (left, center, right, back, forward)
  • Weight cartridges for adjustable 'heft'
  • Textured aluminum scroll wheels
  • Hardware DPI adjustable 'on the fly' with visual indicators
  • Oversize glide pads on the bottom
  • Mouse settings are permanently stored in on-board firmware

Each model also has a few unique features of its own:

Microsoft SidewinderLogitech G9
  • LED display that shows the current DPI setting
  • Glide pads can be swapped out; includes three sets, of varying slickness
  • Accessory box is weighted and doubles as cable anchor
  • Record macro button in front of the thumb buttons
  • Quick launch button on body
  • Vertical side button arrangement
  • Grip body can be swapped out; two different bodies are provided
  • DPI indicator LED color can be changed in software
  • Wheel can be switched between gear and frictionless modes
  • Offers one more DPI setting (4 total)

I noticed that neither of the mouse wheels allow horizontal (left-right) scrolling. This is a good thing, because horizontal scrolling has always struck me as a dubious sort of feature at best. I think you'd need something other than a wheel to do it justice, more like a mini-trackball, and even then I'm not sure the complexity is worth it. How often do you need to scroll horizontally? I'd rather have a firm, bi-directional mouse wheel that's locked to up-down, anyway.

So which one do I prefer? My old Habu wasn't exactly chopped liver-- nor was the Logitech MX 518 I used before that-- but on the whole, I prefer the Logitech G9. The Sidewider is arguably the more innovative model, but I have a few concerns with it:

  1. It is a large mouse. The shape, while unusual, is plenty comfortable-- but bulky. I prefer smaller mice in general.
  2. The thumb buttons are in an unusual location. I've trained my thumb to move up, not forward. Every time I hit the 'back' thumb button, I have to think and stretch a bit to reach it.
  3. It's a bit more awkward in general. Even with equivalent DPI and mouse speed/acceleration settings, I miss small click targets that I had no problem hitting with the G9 or the Habu. I don't think it's a technical limitation; it might be a consequence of the fit.

The G9, on the other hand, is a flawless mouse upgrade. I have no complaints whatsoever-- it's a solid step forward in every respect. Well, there is one minor niggle worth mentioning: the body, because it's designed to be interchangeable, is a tiny bit loose when you pick up the mouse. If you frequently pick up the mouse to adjust the position, you might find that annoying. Also, the frictionless mouse wheel option is fun-- it reminds me of the spinner control in classic arcade games like Tempest-- but useless in practice. It is an option, not a requirement, so I don't deduct anything for that. I'll stick with the Sidewinder at work for a while longer and see if I can adapt. I admire all the innovation at a relatively low price (for this type of enthusiast mouse, at least), but I am sorely tempted to buy another G9.

During all this mouse testing, I spent a lot of time normalizing the pointer speed between the control panel mouse options and the DPI settings in the mouse's hardware. I don't think I realized until now how essential it is to enable mouse pointer acceleration for best pointer 'feel' with any mouse. I strongly recommend that you double check to make sure this this feature is enabled. It's available in Control Panel, Mouse, Pointer Options under 'Enhance Pointer Precision'.

What does Enhance Pointer Precision do? It's a simple concept. When enabled, the pointer moves more precisely when you move the mouse slowly, and more nimbly when you move the mouse quickly. It decouples pointer movement ever so slightly from a basic 1:1 relationship with mouse movement, and introduces something called the mouse acceleration curve.

The translation from physical mouse movement to pointer movement is more sophisticated and more subtle than you might think. It's all documented in an excellent Microsoft article on mouse ballistics. It introduced me to the amusing concept of the mickey: the smallest unit of measurement that the mouse's hardware can produce.

Let's think about this like programmers. If it was our job to translate mouse mickeys into pointer movements, how would we do it? Our first order of business is to figure out how fast the mouse is moving on the table or mousepad-- the mouse velocity.

The accuracy of the mickeys coming from our mouse is strongly influenced by the bus update rate. The math proves it. I talked about this in an earlier post on Mouse DPI and USB Polling Rate. The good news is that fancy enthusiast mice always override the default 125 Hz USB update rate. Both of these mice bump it up to 500 Hz as soon as they're plugged in, which I verified using the Direct Input Mouse Rate tool.

The number of mickeys/inch is similarly influenced by the capabilities of the mouse's sensor hardware, also known as DPI. It should more accurately be called MPI, mickeys per inch. A 'dot' isn't a dot at all; it's a completely arbitrary unit, nothing more than the smallest unit of movement that the hardware can measure. The Sidewinder ranges from 200 DPI to 2000 DPI; the G9 from 200 DPI to 3200 DPI. This is dynamically switchable via the buttons on the mouse, and configurable in software as well. Don't get hung up on the fact that the Sidewinder 'only' goes up to 2000 DPI; the packets going over the wire only allow a mickey size between 0 and +127, so there's a practical limit on how precise you can be.

Now that we have mouse velocity in the physical world, let's determine how that will map to pointer velocity on the virtual world of our screen.

Screens are bounded by obvious, concrete physical limitations. Refresh rate is typically fixed at 60 Hz for modern LCD displays. Screen resolution varies from 800 x 600 to astronomically huge for those that can afford 30' displays, but the DPI ranges are fairly similar for most monitors.

Let's try plugging in some typical values into our formulas:

Vmouse = 3 mickeys * 500 Hz / 1600 DPI = 0.9375 inches/sec
Vpointer = 3 mickeys * 60 Hz / 80 DPI = 2.25 inches/sec

You can immediately see the disconnect-- 1 inch of physical mouse movement resulted in 2.25 inches of screen pointer movement. There's a physical to virtual gain of 2.4x. Without the mouse acceleration curve, this is as sophisticated as it gets. We might use a simple multiplier based on the pointer speed slider, but that's about it. The relationship is linear. We're doing a basic one to one mapping.

But with 'Enhance Pointer Precision', we use a variable curve to determine how far the pointer moves for any given mouse speed. The different colored curves shown here represent different values of the pointer speed slider with acceleration enabled.

It is possible to edit these curves via the SmoothMouseXCurve and SmoothMouseYCurve registry settings, but there's absolutely no documentation I could find on these settings, so be careful. Getting the curve right is crucial. According to the article, the mouse acceleration curves in Windows were determined by a usability study. For example, many people dislike the default mouse acceleration curve in OS X:

So what's wrong with Mac OS X's mouse acceleration curve? Simply put, it's the wrong shape. For mouse motion to feel natural (at least for most people), the curve has to start by moving upward fairly moderately, then gradually flattening out as the value of X increases. Mac OS X's, curve, however, starts off by being too steep, staying too steep for too long, and then flattening out too abruptly. In practical terms this means that, frequently, as a user tries to use the mouse to move the pointer from point A to point B, the pointer motion feels sluggish. The user then tries to compensate for the sluggishness by moving the mouse faster, and the pointer suddenly goes flying across the screen and overshoots point B. A comfortable and useful curve is actually shaped like a curve. Mac OS X's curve, however, is shaped more like a cliff.

Windows may have better curves, as long as that 'Enhance Pointer Precision' checkbox is ticked.

Who knew mouse ballistics could be this sophisticated? Heck, who knew that mouse ballistics even existed until now? Experiment with the 'Enhance Pointer Precision' setting for yourself, but I believe it should always be enabled-- it results in mouse pointer movement most people will find both easier to control and more accurate.