Advertisement

05.30.2008 at 08:03AM PDT, ID: 23444815
[x]
Attachment Details

how do I check if flash memory has been inserted?

Asked by javagair in Linux

Tags: , , ,

I have a script running in a cron job  that mounts a usb memory.
deletes all files found on the usb stick.
copies a new directory to the usb.
and prints out a log file of what the job did.  All works well.

in RHEL unlike fedora usb sticks do not auto mount

I need to know is there something I can put in an if statement that says if you don't find a usb stick then print an error message and exit.

I tried
 if [mount /dev/sdb1 /media/usb]
then
else
fi
but mount does not return a value so answer is always false even if the usb is there.

any suggestion on how to check if the someone actually remembered to insert the usb stick?
garyStart Free Trial
[+][-]05.30.2008 at 11:22AM PDT, ID: 21680193

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.31.2008 at 05:21AM PDT, ID: 21683513

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.31.2008 at 06:33AM PDT, ID: 21683673

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.31.2008 at 09:32AM PDT, ID: 21684208

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.31.2008 at 08:14PM PDT, ID: 21685888

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.31.2008 at 08:18PM PDT, ID: 21685912

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.01.2008 at 04:17AM PDT, ID: 21686602

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 12:48PM PDT, ID: 21703876

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 12:58PM PDT, ID: 21703955

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 02:24PM PDT, ID: 21704671

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 02:38PM PDT, ID: 21704797

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.03.2008 at 02:39PM PDT, ID: 21704814

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 02:31AM PDT, ID: 21708248

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 02:09PM PDT, ID: 21714172

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 03:19PM PDT, ID: 21714687

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux
Tags: linux, RHEL, 5.1, mount usb
Sign Up Now!
Solution Provided By: duncan_roe
Participating Experts: 4
Solution Grade: A
 
 
[+][-]06.05.2008 at 02:52PM PDT, ID: 21724372

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628