📚 Practice Mode

Linux/Unix Shell Scripting Basics

Learn at your own pace with hints and detailed explanations

1 / 8
Multiple Choice

You are executing the following commands in a shell $ cp ~/myfile.dat /media/mounted/ext/drive1/newmyfile.dat $ cd /media/mounted/ext/drive1 $ mv newmyfile.dat oldmyfile.dat and now you are asked to display the long listing of the file "newmyfile.dat". Which of the following will you use ?

  1. ls -lrt !cp:2
  2. ls -lrt !mv:1
  3. ls -lrt /media/mounted/ext/drive1/newmyfile.dat
  4. a and b will give "Command not found error" and c will work fine and all other options are incorrect.
  5. a,b and c will give correct results.