Category: <span>MAC</span>

If you’ve ever tried to unzip a large file on macOS and encountered the mysterious “Error 513,” you’re not alone. This pesky error can pop up unexpectedly, leaving you scratching your head and wondering why your file won’t extract properly. Recently, I ran into this issue myself while trying to decompress a massive archive using the built-in Archive Utility on macOS. After some trial and error, I found a reliable solution: the Keka application. Here’s a rundown of what Error 513 is, why it happens, and how Keka saved the day.

What Is Error 513 on macOS?

Error 513 typically occurs when macOS’s default Archive Utility struggles to handle certain zip files—particularly large ones or those with complex structures. The error message might not give you much detail, often just stating that the operation couldn’t be completed. From my experience, it seems to be tied to limitations in how the native tool processes files, especially if they’re compressed in a way that macOS doesn’t fully support or if the file size pushes the utility beyond its comfort zone.

While the exact cause can vary (think file corruption, incompatible compression methods, or even permission issues), the result is the same: you’re stuck with a zip file that won’t budge. For me, it was a multi-gigabyte archive I’d downloaded, and no amount of retrying or rebooting would make Archive Utility cooperate.

The Solution: Keka to the Rescue

After a bit of digging online and some failed attempts with Terminal commands (like using unzip via Homebrew), I stumbled across Keka, a free and lightweight compression tool for macOS. Unlike the built-in Archive Utility, Keka is designed to handle a wider range of file formats and sizes with ease. Here’s how I used it to solve my Error 513 problem—and how you can, too.

Step 1: Download and Install Keka
  • Head over to the official Keka website (kekadev.com) or grab it from the Mac App Store if you prefer.
  • Installation is straightforward: just drag the app to your Applications folder, or let the App Store handle it for you.
Step 2: Open Your Problematic Zip File
  • Launch Keka from your Applications folder.
  • Drag and drop the zip file causing Error 513 onto the Keka window, or use the “Open” option in the app to locate it manually.
Step 3: Extract the File
  • Keka will automatically start extracting the file to the same directory as the original zip (you can change the destination if you’d like).
  • Sit back and let it work its magic. For my large file, Keka churned through it without a hitch—no Error 513 in sight.

Within minutes, I had my files unzipped and ready to use, something macOS’s default tool couldn’t manage despite multiple attempts.

Why Keka Works When Archive Utility Doesn’t

Keka’s strength lies in its versatility and robustness. It supports a variety of compression formats (like 7z, RAR, and more) and seems better equipped to handle edge cases—like oversized zip files—that trip up Archive Utility. Plus, it’s open-source, so it’s constantly being refined by a community of developers who actually care about making it work.

Bonus Tips

  • Check File Integrity: Before blaming the tool, ensure your zip file isn’t corrupted. You can test it in Keka by right-clicking the file and selecting “Verify” if you suspect an issue.
  • Permissions: If Keka still struggles, double-check the file’s permissions in Finder (Get Info > Sharing & Permissions) to ensure you have read/write access.
  • Update Keka: Make sure you’re running the latest version, as updates often fix bugs and improve compatibility.

Final Thoughts

Error 513 might be a roadblock when unzipping large files on macOS, but it doesn’t have to be a dealbreaker. For me, switching to Keka was a game-changer—fast, free, and frustration-free. If you’re tired of wrestling with Archive Utility’s limitations, give Keka a shot. It’s a small download that delivers big results, and it’ll likely become your go-to tool for all things compression-related on macOS.

Have you run into Error 513 before? Let me know how you tackled it—or if Keka worked for you too!

MAC

The watch command is a useful utility in Unix-like systems that allows you to execute a command periodically and display its output. However, macOS does not come with watch pre-installed. If you’re running macOS Sequoia and want to use watch, follow the steps below to install it.

Recently i switch my mabook to a new MacBook Pro M2 and try to use the command to watch some openshift logs and i got the following result:

To install just use Homebrew.

brew install watch

Using watch on macOS

Now that watch is installed, you can start using it. The basic syntax is:

watch -n <seconds> <command>

For example, to monitor the disk usage of your system every two seconds, you can run:

watch -n 2 df -h

Additional Options

  • -d: Highlights the differences between updates.
  • -t: Turns off the title/header display.
  • -b: Beeps if the command exits with a non-zero status.

Alternative: Using a while Loop

If you prefer not to install watch, you can achieve similar functionality using a while loop in the terminal:

while true; do <command>; sleep <seconds>; done

For example:

while true; do df -h; sleep 2; done

This method works in any macOS version without requiring additional installations.

Linux MAC

This error appears today on my MAC using macOS 12.6 Monterey. I don’t know the cause and . It was woking last time i used podman on this MAC.

To solve the problem:

podman machine rm podman-machine-default

brew uninstall podman

brew install podman

podman machine init

Cloud MAC

This month i am creating a Course about AI & IoT   (AI & IoT Fundamentals).

The course are about AI and IoT in general but i will use IBM Watson APIs, IBM Watson IoT and off course Node-Red and Raspberry Pi to make the excersices.

The course is 15 hours long (lots off video) plus the exercises.

Using the Keynote to generate de videos is fine but when i export the video the only option is M4V type.  To convert the videos i am usin FFmpeg.

1 – Install FFmpeg brew install ffmpeg

2 – Convert to mp4 using ffmpeg -i input.m4v out.mp4

3 – Convert to webm ffmpeg -i input.m4v output.webm

 

AI IoT MAC

Command line tools are always welcome.  Today i need to setup my MAC to work with IBM Cloudant

Install curl on your MAC if you haven’t done it yet.

1 – You need to setup the Cloudant DB using your IBM Cloud account.

2 – Go to service credentials and get your username, password and hostname

Sample:
"username": "xxxx-xxx-xxx-bluemix",
"password": "12345678901234567890",
"host": "xxxx-xxx-xxx-bluemix.cloudant.com"

3 – Test the connection

curl –v –u xxxx-xxx-xxx-bluemix 'https://xxxx-xxx-xxx-bluemix.cloudant.com'

The command will prompt for the password: 12345678901234567890

You will see a lot off lines but pay attention on the line Authorization: Basic. This will be used to setup acurl (authorized curl) to avoid type the password every time you use curl.

* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Server auth using Basic with user ‘xxxx-xxx-xxx-bluemix’
* Using Stream ID: 1 (easy handle 0x7fabd0805800)
> GET / HTTP/2
> Host: xxxx-xxx-xxx-bluemix.cloudant.com
> Authorization: Basic asddadasdDASDdaDadaDSERQERQRQERQEDSGSFDGSFDG==

4 – Edit the .bash_profile or .bashrc file in any text editor. For example, from the command line, issue the following command:
open –e .bash_profile

5 – Add the following line to the file, then save the file.
alias acurl="curl -s --proto '=https' -g -H 'Authorization: Basic asddadasdDASDdaDadaDSERQERQRQERQEDSGSFDGSFDG=='"

6 – On the terminal run : source .bash_profile

7 – Issue a command using the new alias. For example, issue a command to view your account information.
acurl -X GET 'https://xxxx-xxx-xxx-bluemix.cloudant.com'

TIP: The hostname is not friendly you can edit your hosts file and create an alias:

On MAC terminal type: sudo vi /etc/hosts

ping your hostname to get the ip address

add a line like this one bellow:

<ip address>  xxxx-xxx-xxx -bluemix.cloudant.com  keniodb.cloudant.com

Save the hosts file

test the connection

acurl -X GET 'https://keniodb.cloudant.com

 

Linux MAC

Today i need to rename lots of files from .txt to .json.   I type the following on the terminal window:

for f in *.txt; do
mv "$f" "$(basename "$f" .txt).json"
done


MAC