-
๋ฆฌ๋ ์ค | spaces in filename์นดํ ๊ณ ๋ฆฌ ์์ 2023. 6. 13. 23:58
Spaces ๊ฐ filename ์ ๋ค์ด๊ฐ ํ์ผ
Read
๋์ด์ฐ๊ธฐ ๋ค์ด๊ฐ ํ์ผ์ ์ฝ์ผ๋ ค๊ณ ํ๋ฉด ์๋ฌ๊ฐ ์๊ธด๋ค.
touch space filename
๊ทธ ์ด์ ๋ ํฐ๋ฏธ๋์ ๋ ๊ฐ์ ๋ค๋ฅธ ํ์ผ๋ก ์๊ฐํ๊ธฐ ๋๋ฌธ์ด๋ค. "space", "filename"์ ๊ฐ๊ฐ ๋ถ๋ฆฌํด์ ์๊ฐํ๋ค.
๋จผ์ ํ์ผ์ ๋ด์ฉ์ ๋ฃ์ด๋ณด์
๋ค์๊ณผ ๊ฐ์ด ์ฝ๋๋ฅผ ์ ์ ๊ฒฝ์ฐ, space๋ผ๋ ์๋ก์ด ํ์ผ์ ์์ฑํ๊ณ ๊ทธ ์์ empty file ํ ์คํธ๊ฐ ๋ค์ด๊ฐ๋ค.
echo "empty file" >> space filename
๋๋ฌธ์ Create์ ๋ง์ฐฌ๊ฐ์ง๋ก ๋ฐ์ดํ๋ ์ด์ค์ผ์ดํ ๋ฌธ์ + space๋ฅผ ์ด์ฉํ๋ฉด ๋๋ค.
echo "empty file" >> space\ filename
or
echo "emtpy file" >> "space filename"
๋ด์ฉ์ ์ฝ์ ๋๋ ๋ง์ฐฌ๊ฐ์ง๋ก
cat space\ filename
or
cat 'space filename'
Create
Read์ ๋ง์ฐฌ๊ฐ์ง๋ก ๋ ๊ฐ์ ํ์ผ๋ก ์๊ฐํด์ "space", "filename" ์ด ๊ฐ๊ฐ ๋ง๋ค์ด์ง๋ค.
touch space filename
๋๋ฌธ์ ๋ฐ์ดํ๋ฅผ ์ฌ์ฉํ๊ฑฐ๋ \ + space๋ฅผ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ด ์๋ค.
touch space\ filename
or
touch 'space filename'
ํด๋ ์ด๋
๋ง์ฐฌ๊ฐ์ง๋ก ๋ฐ์ดํฌ๋ ์ด์ค์ผ์ดํ ๋ฌธ์๋ฅผ ์ฌ์ฉํ๋ค.
cd dir/'space directory'
or
cd dir/space\ directory
Long paths with spaces require quotation marks - Windows Server
Solves an issue that occurs when you specify long filenames or paths with spaces.
learn.microsoft.com
How to reference filename with spaces in Linux
For Linux, the user terminal is the most crucial program to manage almost everything in the operating system. But many people do not prefer the command line because they assume that it is a very technical program and require particular expertise to use it.
linuxhint.com