Find the answer to your Linux question:
Results 1 to 2 of 2
A sysadmin uses the following commands to replace myApplication with myApplication.new. There are two mistakes. What are they? What is a better way to accomplish the task? user1#host1:~/tmp$ ls -l ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    2

    What is the right way to replace a old file with a new one?


    A sysadmin uses the following commands to replace myApplication with myApplication.new.

    There are two mistakes. What are they? What is a better way to accomplish the task?

    user1#host1:~/tmp$ ls -l
    total 8
    -rwxr-xr-x 2 user1 eng 523 Aug 6 16:45 myApplication
    -rwxr-x--- 1 user1 eng 504 Sep 18 15:27 myApplication.new
    user1#host1:~/tmp$ mv myApplication myApplication.orig
    user1#host1:~/tmp$ mv myApplication.new myApplication
    user1#host1:~/tmp$ ls -l
    total 8
    -rwxr-x--- 1 user1 eng 504 Sep 18 15:27 myApplication
    -rwxr-xr-x 2 user1 eng 523 Aug 6 16:45 myApplication.orig
    user1#host1:~/tmp$

    I don't know any other better ways, could someone give a clue?

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Hello and welcome!

    Sorry, but homework questions are not permitted on the forums:

    http://www.linuxforums.org/forum/lin...ums-rules.html

    ...but we do wish you the best of luck with your studies.
    oz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •