如何在Mac上使用Z shell删除.zshrc文件中的.txt?

huangapple go评论59阅读模式
英文:

How to remove .txt on a .zshrc file using Z shell on a mac?

问题

如何移除.txt文件末尾?

英文:

I had to edit my .zshrc file and it was locked, so essentially created a copy, then edited and deleted the original .zshrc file. I have renamed my '.zshrc copy' file to just '.zshrc' however when I ls -a it shows as .zshrc.txt

How do I remove the .txt end?

答案1

得分: 1

你可以使用mv命令来重命名文件,以删除.txt扩展名。

cd ~
cp .zshrc backup_zshrc
mv .zshrc.txt .zshrc

如果已经存在,它会覆盖它。

英文:

You can rename the file using the mv command to remove the .txt extension

cd ~
cp .zshrc backup_zshrc
mv .zshrc.txt .zshrc

overwrite it if it already exists

huangapple
  • 本文由 发表于 2023年3月3日 23:59:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/75629304.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定