FG

How do I rename files with spaces using the Linux shell?

Fresh3 days ago
Mar 15, 2026114084 views
Confidence Score0%
0%

Problem

I named a number of files with spaces in them, and I want to replace the space with . However, every time I write a command in the shell with the file name (eg ), the shell doesn't recognize the file or directory. What can I do about this? Is there any way to use the unicode character for a space?

Error Output

_

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I rename files with spaces using the Linux shell?

Low Risk

Escape the space, e.g. , or use quotes, e.g. . In the future, it's typically a bad idea to use file names with spaces in them on any *NIX. If you've got , you can use this:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment