View Single Post
Old January 19th, 2013, 01:45 PM   #48 (permalink)
The TechnoFrog
argedion's Avatar
Join Date: Jun 2011
Location: The Severed Garden
Posts: 5,828
Device(s): Nexus 7 (2012)
Carrier: Not Provided

Thanks: 6,012
Thanked 5,575 Times in 2,572 Posts

recently working on a project that called to find out if a file existed or not I had no idea of how to do this in Linux. Not being always the sharpest tool in the shed I tried several ways and failed miserably. I searched a little but since I suck at searching (never know really what to ask) somehow though i seemed to have found my way and its really simple.

here is a test condition to find if a file exist or not using bash

if [[ -e "filename" ]] ; then

just thought I would share for those who didn't know
All My Links In one Convenient Place
Asking simple questions can keep us from doing dumb things.
argedion is online now  
Reply With Quote