There is need that I want to rename file in Linux if file exist in a single command.
Suppose I want to search test.text file and I want to replace it with test.text.bak then I fire the following command
find / -name test.text if it exist then I fire the command mv test.text test.text.bak
In this scenario I am executing two commands but I want this should be happen in single command.
Thanks