LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 06-16-2011, 06:09 AM   #1
elemaniaq
LQ Newbie
 
Registered: Jun 2011
Posts: 2

Rep: Reputation: Disabled
Question "Late Saving" Problem


Hello,

Im working on I.MX28 dev board and using kernel 2.6.35 on it. The problem is that when i created a file and echo some text to it, i can see content of the file in the correct form. After this operations, if i restart my board with poweroff command , i can see file and its content again. But if i restart my board hardly(with reset button), i can see the file but it contains nothing.

How can I solve the "late saving" problem ?

Regards,
Snan
 
Old 06-16-2011, 07:35 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Try
cat >> your_file <<EOF, which should return
>
type or paste your text there. When you press return, you get another
>
When you simply type EOF, the whole thing should be saved off.
 
Old 06-16-2011, 08:25 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Do you have a good reason to improperly shut down Linux?

There are other files that this could also happen to. Also, if it happened to be writing to the hard drive while you turned off the power, it might corrupt your filesystem.
 
Old 06-17-2011, 06:40 AM   #4
elemaniaq
LQ Newbie
 
Registered: Jun 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
business_kid,

Thank you for your reply.i tried, it works !

MTK358,

my project will be used on the vehicles and it will shut down if the driver stops engine.

Last edited by elemaniaq; 06-17-2011 at 07:21 AM.
 
Old 06-17-2011, 07:59 AM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
If the thread is solved, mark it as solved.
 
Old 06-17-2011, 09:46 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by elemaniaq View Post
my project will be used on the vehicles and it will shut down if the driver stops engine.
Wouldn't it be better to do a proper shutdown when the driver stops the engine?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question/Suggestion - about saving a "subscribed thread" in more than one folder? GrapefruiTgirl LQ Suggestions & Feedback 1 09-14-2009 11:27 AM
scrambled display after entering "power saving?" state rbees Linux - General 2 02-26-2008 05:32 AM
Debian "testing" -- lots of bug reports of late? vharishankar Debian 5 10-15-2006 01:34 AM
Is it too late to retire "spam" as the noun for unsolicietd e-mail? PTrenholme General 1 11-09-2005 04:41 PM
A "late collision" every 2-3 seconds RedDwarf Linux - Networking 2 08-16-2004 05:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration