shell script to find certain file created or not
one file is created and any shell script to find that file is created or not
|
Hi and welcome to LQ.
... And your question is? Please describe your problem in a clearer way and tell us where you are stuck so that we can help you. |
You'd need to provide more detail.
Are you writing a script that creates the file and checking to see if it in fact created it or are you just looking to see if a file exists. If the latter you don't need a script. If you know the location you can use ls and if you don't you can use find: e.g. If you're looking for a file named billybob and it is should be in /usr/local/bin you can do "ls /usr/local/bin/billybob". If it is there it will show the file - if not it will say "not found". If you don't know where it is you can do "find / -name billybob" and it will find any file of that name. Note that find is context switch heavy so if you can narrow it down (e.g. if you know it should be somewhere under /usr but not sure exactly where) you should do so: "find /usr -name billybob" |
All times are GMT -5. The time now is 04:20 AM. |