1. Modify cofile such that it will keep a copy of the old existing file (if available) before the renaming operating. As
Posted: Fri May 20, 2022 2:47 pm
1. Modify cofile such that it will keep a copy of the old existing file (if available) before the renaming operating. Assume that apple.txt will be renamed as orange.txt. When the command "/cofile apple.txt orange.txt" is executed, the script will first check whether orange.txt exists under the given path or not. If the file exists then orange.ext will be renamed as orange.txtold before renaming apple.txt as orange.txt. Make tofile an executable shell script; try to rename a file to a filename that already exists. Show your shell program and its output to the instructor.