•  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

  • 混合雲:幾乎皆大歡喜
  • 劣跡斑斑被設置 - 世界上最大的DDoS攻擊
  • Why Gaming Companies are Choosing Bare Metal Servers
  • Single vs Dual vs Multi-homed Network
  • SSH Port Forwarding
  • Reference Architecture - Dedicated Server Deployment
  • Red Hat: Not just about Linux anymore!
  • Load Balancing Methods
  • KVM Server in USA
  • How to setup a dedicated server for Team Fortress 2
  • How to Install SSL Certificate On Centos 7
  • Fully dedicated high end server hosting?
  • Common Types of Network Attacks
  • Bare Metal Server Hosting
  • Add user to sudoers Centos
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