Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8881369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:20:01+00:00 2026-06-14T20:20:01+00:00

How can I rename a file with chef? In the chef doc I found

  • 0

How can I rename a file with chef?

In the chef doc I found only:

  • create
  • create_if_missing
  • delete
  • touch
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:20:02+00:00Added an answer on June 14, 2026 at 8:20 pm

    Use ruby_block and inside use ::File.Rename(src,dst). Chef framework doesn’t have file rename (or at least didn’t had until 0.10.18).

    Just an example:

    ruby_block "Rename file" do
      block do
        ::File.rename(new_resource.src,new_resource.dst)
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I remember in SVN, I can rename a file from foo.txt to foo2.txt and
How can I rename a file in linux to strip out certain characters from
How can I rename the file to a timestamp or random unique number before
How can I rename 1..n file with ANT? I would like to rename any
Under linux, you can rename a file with overwrite. For example, rename -f file_a
How can I rename each file in folder: pattern is: (first part of file
I am trying to delete a file, then rename a file to the deleted
The title is self-explanatory, I want to know how I can rename a file
How do I use File::Copy to rename a file extension? So far, I can
I know that I can rename my webapp (or it's WAR file) to ROOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.