0

I used locate command to locate the zip file as find was not working in this case. Then run unzip it manually. I am learning shell scripting. How can I do it in shell script?

  • Edit a text file, shellscript file, to include the command lines that you used manually, one line after the other, save the file and make it executable. It is a good idea to put a 'shebang' as the first line in the file; to make it use bash: #!/bin/bash. Please try, and if you need help to make it work correctly, please edit your original question to show your shellscript file ascode. – sudodus Oct 13 '21 at 11:11
  • There are several good tutorials that you can find if you browse the internet. Use a suitable search string, for example bash shellscript tutorial – sudodus Oct 13 '21 at 11:20
  • Why is find not working in this case? This can perfectly be done with find in one go. – vanadium Oct 13 '21 at 15:57
  • Find will only search in that directory. I am talking about anywhere in system. – Fox Chasin Oct 13 '21 at 16:32
  • find / -name filename will search 'everywhere' (for the file 'filename'). You may need elevated permissions (prefix with sudo) to be able to search where a regular user lacks access. But locate is often much faster than find. – sudodus Oct 14 '21 at 06:30

0 Answers0