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

rename a file in linux

  • Home
  • Client
  • Qa Forum
  • rename a file in linux

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

how to rename a file in linux? 

Psychz - Raviteja

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

Een bestand in Linux kan hernoemd worden door meerdere methoden te gebruiken. Hier zijn enkele van de belangrijke methoden die gebruikt worden om een ​​bestand in linux te hernoemen.

Het commando "mv" (verplaatsen)

Het commando 'mv' in linux kan ook worden gebruikt om een ​​bestand te wijzigen in linux. Stel dat u een bestand wilt hernoemen, dat u het bestand gewoon naar dezelfde map moet verplaatsen met een andere naam. Laat ons dit laten zien met een voorbeeld.

Stel je voor dat je een bestand met de naam "file1" in de directory "document" hebt. U wilt dit bestand hernoemen als "bestand2". Voer de volgende opdracht uit in uw terminal.

Mv file1 file2

De syntaxis van het commando "mv" is:

Mv "oude bestandsnaam" "nieuwe bestandsnaam"

Sommige opties die kunnen worden gebruikt met het commando "mv" zijn:

1. Verbeter (-v)

Mv -v "oude bestandsnaam" "nieuwe bestandsnaam"

Dit is de verbose optie die zal tonen welke taak het commando heeft uitgevoerd.

Sample output -

2. Interactieve (-i)

Mv -i "oude bestandsnaam" "nieuwe bestandsnaam"

Deze optie vraagt ​​u voordat u wijzigingen aanbrengt.

Het commando 'hernoemen'

Het commando "hernoemen" kan gebruikt worden om meerdere bestanden te hernoemen.

De syntaxis wordt gegeven als:

De naam van de naam / old_name / new_name 'wijzigen
Hernoemen - [opties] 's / old_name / new_name' bestanden

Stel dat u alle ".jpg" bestanden wilt veranderen in ".jpeg" -bestanden die u gewoon de volgende opdracht uitvoert.

Hernoem 's / jpg / jpeg /' * .jpg

Dit waren twee basisopdrachten die gebruikt werden om een ​​bestand in linux te hernoemen. Deze opdrachten komen met een verscheidenheid aan opties. Zodra u het basisbegrip krijgt, kunt u verdergaan met complexe opties.

Was this reply helpful?

Related topics

  • SSH File Transfer
  • How to find a file using find and locate command on Linux?
  • How to search in Linux?
  • Linux Find Commands
  • Linux Command for Find Directory
  • Basic and useful Linux commands
  • Linux File Permissions Cheat Sheet
  • How to setup a dedicated server for Minecraft
  • Set Device Name for your Devices
  • How to free up disk space on a cPanel server
  • cVirtual Connect from Windows
  • Top Useful Features Of Linux Mint
  • Scientific Linux and its features
  • What Scientific Linux is and its features
  • Top Myths About Linux Security
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