•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

重命名一个linux文件

  • Home
  • Client
  • Qa Forum
  • 重命名一个linux文件

Posted By: Jeremy | 1 Replies | Last Reply On: May 23, 2017 06:22:54

如何重命名linux中的文件?

Psychz - Raviteja

Votes: 0Posted On: May 23, 2017 06:22:54
 

可以使用多种方法重命名linux中的文件。这里有一些用于重命名linux中的文件的重要方法。

“mv”(move)命令

linux中的“mv”命令可用于移动以及重命名Linux中的文件。假设您要重命名一个文件,您只需要使用其他名称将文件移动到同一个目录。我们以一个例子来展示一下。

想象一下,您在目录“文档”中有一个名为“file1”的文件。您要将此文件重命名为“file2”。在终端中运行以下命令。

mv file1 file2

“mv”命令的语法是:

mv“旧文件名”“新文件名”

可以使用“mv”命令的一些选项是:

详细(-v)

mv -v“旧文件名”“新文件名”

这是一个详细选项,它将显示命令执行的任务。

样品输出 -

互动(-i)

mv -i“旧文件名”“新文件名”

此选项将在进行任何更改之前提示您。

“重命名”命令

“rename”命令可用于重命名多个文件。

其语法如下:

重命名/ old_name / new_name'文件
重命名 - [options]的/ old_name / new_name'文件

假设您要将所有“.jpg”文件更改为“.jpeg”文件,您只需运行以下命令即可。

重命名的/ jpg / jpeg /'* .jpg

这些是用于在linux中重命名文件的两个基本命令。这些命令带有各种选项。一旦你得到基本的了解,你可以继续复杂的选择。

Was this reply helpful?

Related topics

  • 科学Linux和其功能
  • 数据中心设计的最佳实践
  • 小企业专用服务器
  • 专用服务器价格
  • sObject - CNAME Guide
  • Why AT&T-Time Warner Merger Is Bad News for Everyone
  • What is HTTP/2 ?
  • Unmetered Dedicated Server Hosting for SaaS: 5 Reasons to Ditch the Cloud
  • Shared hosting vs VPS vs Dedicated Server
  • Reading real IPs
  • Psychz Networks Launches New Data Center in Moscow, Russia
  • Private Network Hosting
  • Notifications - Manage
  • Dedicated Server Black Friday
  • Create CNAME Record
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801