Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Hot answers tagged

12

I filed a bug report with Apple and this seems to finally be fixed now in Mojave 10.14.4 (18E226). To fix, update your OS to the latest version. Then reboot into recovery (CMD-R) and run disk first aid. It should show one or more error: directory valence check: directory (oid 0x123456): nchildren (1) does not match drec count (0) and / or error: ...


4

As of Mojave 10.14.2 version, you can change "Save to" destination by entering screenshot mode (press screenshot key on touchbar or Command+Shift+5), then you'd see quick tools (region selection, etc). Go to Options -> Save to... -> Other location... and choose desired location for your screenshots. Now all screenshot (even those you process with quick ...


3

You can remove the file without disabling SIP by booting to Recovery and then deleting the file in the terminal. The system disk is actually mounted read/write in Mojave Recovery, so the trick is that you have to refer to the drive by starting at /Volumes/yourdrivenamehere. So in this case the command to remove the file would be: rm -rf /Volumes/...


3

Here's one that people often overlook: BetterZipQL. This is a free module for Finder's "QuickLook" function and allows its Preview pane to show you the contents of an archive just as if it were a folder full o' files.


3

There are several limits to consider that have been touched upon by some of the comments: argument length and shell expansion - a simple echo * will bail if the concatenated length of filenames the asterisk expands to hits upon that limit. If running into this snare, often find will be your friend. find . -depth 1 -type f | exec echo {} \; would be a ...


3

Finder menu > Preferences > Sidebar tab Check the box next to Applications.


2

To change the file flag of a symbolic link, or a Finder alias, rather than its associated file, use the -h option: $ chflags -h hidden file To unhide a file that has the hidden flag set, use: $ chflags -h nohidden file


2

Finder Here are a few different ways to filter by file extension, with a brief description of their benefits. For the purposes of illustration, I've had Finder operations performed upon an open Finder window (my Pictures folder), which has many jpegs in it that serve as a good sample against which to test exclusion filters. tell application "Finder" to ...


2

Try this : tell application "Finder" set theFiles to files in folder (choose folder) whose name does not end with ".bat" reveal theFiles end tell


2

You will need to disable System Integrity Protection and remove /Library/SystemMigration/History/Migration-1C2FCFF8-A394-409D-8DB3-E7885C0D5E81/QuarantineRoot/Library/Extensions/Soundflower.kext (and then re-enable System Integrity Protection). To enable or disable System Integrity Protection, you must boot to Recovery OS and run the csrutil(1) command from ...


2

This following AppleScript code will ask you to choose the script file to attach then we'll give you two separate options for adding multiple folders to attach that script file to This works for me using the latest version of MacOS Mojave. property pathToFolderActions : ((path to workflows folder as text) & "Applications:Folder Actions:") tell ...


2

The following script will take care to construct new directories as needed and will only move new files as they appear within a given directory, into their respective subdirectories, ie. 0015, 0016, etc. $ cat mover.sh #!/bin/bash find . -type f -name "*.mxf" -depth 1 -exec sh -c ' file="${1/\.\//}" echo "$file" dir=${file/[_.]*mxf/} [ -d "$...


2

for i in {10..99} do mkdir 000$i mv 000$i* 000$i done for i in {100..999} do mkdir 00$i mv 00$i* 00$i done for i in {1000..9999} do mkdir 0$i mv 0$i* 0$i done This bash script should work for 10-9999 directories.


2

Set Finder to show icons Access view options with Cmd-J Enable "Show item info" option (where it says "Objektinfo einblenden" in the screenshot below)


2

I hope running this python script works. TEST would have all the folders you mentioned. I have modified the workflow slightly to avoid messing with Finder and AppleScript. The final file can be opened in Excel. import os import fnmatch import time directory = "your/dirname/Desktop/TEST" y = [x[0] for x in os.walk(directory)] y = y[1:] #%% thedict = {} ...


2

The following is an example Automator workflow that achieves the stated goal of your question per its defined hierarchal folder structure. NOTE: While the example bash code used in the Run Shell Script action completed successfully nonetheless, the onus is upon the user to ensure that proper backups exist before using it. I'd even suggest making a small ...


2

You can create a Smart Folder (which continually updates with the results of a Spotlight search). Open the target folder (e.g. Documents, your user home, Macintosh HD, etc) in a new folder. Click on File > New Smart Folder Click + to add additional criteria. Set the criteria as Modified within the last 7 days. Set the Kind to Folder. You can save the Smart ...


2

The instructions use the same formatting for commands you need to enter and for output, which is confusing. Just use mkdir to create any missing directories. PS: It seems as if the directory structure within webpack-demo is created automatically by the various commands you run (or are supposed to run), so you may not even need to create additional ...


1

If you want to search in Finder for the same, and then do the equivalent in Mail, you should go to /Users/you/Library/Mail/V* * varies for MacOS. Do either of these 2: In the question, you mentioned that you can search for specific messages inside mail app. So just pick a rare keyword from one of them and search for the same string in the directory. Press ...


1

macOS by default sets the permission on the standard directories (Documents, Pictures, Music, Library etc) to 0700. If this somehow got changed you can easily run chmod 0700 ~/{Documents,Pictures,Music,Library,Downloads,Movies} to fix it. And of course you can use the same command to change the access rights for other directories as needed. To also ...


1

The default macOS install does not collect statistics on the most visited or most "active" folders in Finder, nor is there an option to enable such data collection.


1

I solved the problem. When I ran: chmod -R 777 /vpn/directory What I actually ran was: chmod -R 747 /vpn/directory So, the group wheel had only read permission. I thought my standard account was not part of the group wheel and I ran dscacheutil -q group | grep 'wheel' -A 4 To make sure. I got the output: name: wheel password: * gid: 0 users: root ...


1

Just drag your folder to the "Favorites" panel and it will be the root folder for that window. You can see the full path at the bottom, my folder (Mateus) is deep in the HD but the parent columns are not showing.


1

Note that this works for me in macOS High Sierra, but as mentioned in a comment does not work in macOS Mojave. One of the ways I know how to have the target folder be the left most column while in Column view in Finder is to do the following: While in Column view, highlight (select) the target folder. Either press ControlCommandO or right-click and select: ...


1

QuarkXPress creates a "boost_interprocess" folder I've just found the answer. This folder can be created for several process, but in this case it's QuarkXPress, as outlined in this QuarkXPress support post.


1

Use the command: $ ls -A | wc -l What you're doing here is piping the output to another Unix function called wc (word count) and counting each line individually (the -l flag). The ls -A command will list all entries including files/folders starting with a . (which are not visible from Finder usually), only excluding . and .. (which stand for the current ...


1

Are these two scripts? Did you run both? I've lost context. If you typed these commands in at the terminal should see the commands in the output, but I haven't been able to find the commands. You should place your usb stick in your machine before booting. I think the problem is that the commands you are attempting to use don't run in the bare single ...


1

My friend, at first glance you are going to have a problem with the file hierarchy, given it is not the normal volume and its structure which the script has made presumptions to use. Your root file system in recovery mode is a different volume and not the normal one used in normal use. You will likely be better off in normal mode, or booting to single ...


1

I think that it's a permissions problem. diskutil resetUserPermissions / `id -u` After entering the diskutil command, if Terminal says that permissions reset on user home directory failed (error -69841), enter chflags -R nouchg ~ and enter the diskutil command again. You can also double-check whether your user Library folder is set properly. Open Finder ...


1

When you're in a directory press command+J to see the View options. Now go about setting the view options exactly how you'd like them to be. Once completed, click on the Use as Defaults button at bottom centre of the View options window. This will set your configuration as the default for all directories.


Only top voted, non community-wiki answers of a minimum length are eligible