Reading list Switch to dark mode

    Bash script to find the file exist under the specified path or not

    Updated 5 April 2014

    This is simple script to find the file in linux whether it exist in the specified location or not

    #!/bin/bash

    echo -n Please Enter the File Name:
    read filename

    echo -n “Now, Enter the path to the file : ”
    read filepath

    if [ -r $filepath ]
    then

    Start your headless eCommerce
    now.
    Find out More

    if [ -f ${filepath}/${filename} ]
    then

    echo !! File ${filepath}/${filename} is Found!!

    else
    echo Sorry, File ${filepath}/${filename} is not found.

    fi
    else
    echo Access Denied to the Directory $filepath
    fi

     

    save it and run….

     

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home