When a file is opened by a program, a filesystem lock is placed that prevents it from being accessed by another program. However, most programs in OS X will only truly “open” a file as a brief step in order to read its contents into memory. The file is then technically closed so it may be accessed elsewhere. Further interaction with the file will result in another quick “open” followed by the instructed manipulation right before the file is closed again, and computing goes on. Continue reading
Tag Archives: Terminal
How to get file information from the command line in OS X
When you are browsing your files in the OS X Finder, you will have a number of options for telling you what the file is. For starters, most files have an icon that represents the program that will open it, and then you can click the file and press Command-i to get information on it. When managing file in the OS X Terminal, if you are relatively new to the Terminal you may think the only identification for a file is its name (ie, a “.txt” suffix for a text file); however, there are several tools you can use to see quite a bit of information about a file. Continue reading
How to authenticate a shell script with the OS X GUI
When you run various commands and scripts in OS X, you may need to first authenticate the actions you are taking as administrator. While some commands include options for providing authentication, generally you will run the “sudo” command as a precursor to your desired one, in order to promote the desired one to run with full administrative access privileges. Continue reading
How to script QR and data matrix code generation in OS X
If you have a need to catalog items, be they for inventory of a store, or for assets of a business, you might find yourself needing to create some sort of barcode option for your items. Granted there are a number of well-established software packages for doing so, but at times you may create custom scripts, out of which you might want a QR or data matrix code to be generated. Continue reading
How to change the Dock for another user account in OS X
The Dock in OS X is meant to be easily configurable, where you can simply drag items to and from it, or resize and position it to organize and manage it according to your needs. However, there may be times when you need to set up a Dock for another user, which may be more significant for a Mac being used in a school, business, or other multi-user environment, and especially true for one which you are managing remotely. Continue reading
Prevent Gatekeeper from auto-enabling in OS X
Gatekeeper is an execution prevention technology in OS X that will block apps from running if they have not been properly certified. It combines with similar technologies in OS X such as quarantining of downloaded files, to give you ample warning that a program you are running may be suspicious if it has not come from vetted sources, such as the App Store. Continue reading
How to hide a user in two steps in OS X Yosemite or later
If you wish to have a user account on your Mac that is discrete so others using your Mac cannot see that user, then you can do so by the classic methods of changing the user ID for the account and then adjusting some hidden system settings to manage those accounts at the login window. While these approaches are the most compatible across different OS X versions and still work for the latest ones, if you have OS X Yosemite or later on your Mac, then there is an easy two-step approach for hiding user accounts. Continue reading
How to find group membership in OS X
Groups in OS X are special account entries that act as umbrellas under which user accounts may exist, allowing single adjustments of access permissions to immediately apply to numerous users. As a result, the use of groups when setting up a multi-user Mac can be exceptionally useful, but then again may also leave open security holes if not done correctly. Continue reading
How to create hidden administrative accounts in OS X
If you have a system that is used by other people, you may want to give them managed user accounts and then reserve a separate administrative account for installing apps and changing system settings. This is especially true for situations where many people may be using one computer, such as in classrooms. While you can always create an administrative account, by default such accounts will show up along with others at the login window, in the Fast User Switch menu, and other locations; however, you can set this up to be hidden from most of these locations. Continue reading
How to create a quick ASCII banner in the OS X Terminal
Even if you are not a Terminal wizard, there are some fun tools and features of it that can be amusing. For instance, some online services are available for you to log into with Telnet and watch a text-based version of Star Wars, or you can play odd games that folks have coded into the “emacs” editor, among others. If you are ever sitting at your Mac and suddenly have the urge to print out a massive banner of a text phrase, then you can do that to. Continue reading