% cd ~/Library/Application Support/Sublime Text 3
cd: too many arguments
"cd: too many arguments" error occurs when you are trying to make use of the cd - change directory command to change your current working directory in the terminal or the command line.
Why this error
As the error says you are providing too many arguments to the command, while it excepts only one.
To know more about the syntax of this error let's take a look at its man page.
cd [-L|-P] [directory]
In the above example where our cd command failed we have provided
% cd ~/Library/Application Support/Sublime Text 3
So definitely the issue is that we have added spaces in the directory path that is treated as a next argument!
Possible Fixes: Step-by-Step
Fix 1: Surround the path with double quotes
% cd "~/Library/Application Support/Sublime Text 3"
Fix 2: Make use of backslashes to escape special characters
You may also get this error if the directory name has special characters like braces.
# cd My Dir (Important)
bash: syntax error near unexpected token `('
In such a case you can escape the special characters with backslashes
# cd My\ Dir\ \(Important\)/
Fix 3: Make use of tab completion
This is something that is highly recommended, while navigating to a directory using the cd command, always write some text pertaining to a directory and press the tab to autocomplete. It will automatically escape special characters for you!
Example as gif demonstration.Facing issues? Have Questions? Post them here! I am happy to answer!
- How to list all users in Mac Terminal
- Docker Desktop needs privileged access macOS
- Mac: How to show count of files and folders in Finder
- How to Change Background Color TextEdit on Mac
- How to adjust MacBook Desktop icons size
- Test internet speed using macOS Terminal command
- How to change the default font and text size in Microsoft Excel for Mac
- How to install Java on macOS [Big Sur]
- How to come out of dquote prompt in Terminal - macOS/Linux
- How to Increase MacBook Trackpad Cursor Speed on macOS Ventura/Sonoma
- Fix: Microsoft Excel Quit Unexpectedly on Mac
- How to Adjust macOS System Font Size
- How to Quit Applications on Mac Using Terminal
- How to check zsh installed version using terminal
- Two Ways to Extract rar (*.rar) files on Mac
- How to Right Click on Mac Desktop?
- How to Add Brew to PATH M1/M2 Mac
- How to search (find) in macOS Terminal Console Text
- macOS 13 Ventura - The New About this Mac Window
- TextEdit Get the count of lines in a file
- How to run .sh file in Mac Terminal
- Google Search Hot Trends Screensaver for Mac OS X
- Check Reboot History Mac
- [Solution] Mac Update Stuck Preparing macOS Ventura 13.0 About 30 minutes remaining
- Display Safari URL address link on hover
- Fix: EOFError Exception in Python - Python
- How to write hello world different languages syntax - HowTos
- Easy Steps to Upgrade iPhone to the new iOS 16 - HowTos
- How to know the Safari Version on Mac - MacOS
- How to Enable spellcheck Notepad++ - NotepadPlusPlus
- How to know the version and Device ID of OneDrive on Mac - Windows
- vi undo redo command [Examples] - Mac-OS-X
- How to record PowerPoint slide show presentation on Mac - narration, slide timings, ink gestures - Microsoft