LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 05-12-2013, 12:37 AM   #1
errigour
Member
 
Registered: May 2009
Posts: 227

Rep: Reputation: 4
Can I somehow orginize my hardrive


Is there a way that I can organize a mounted portion of my hardrive kind of like disk
defragmenting accept I also want to zero out the rest of the mounted portion of my
hardrive that is not being used? Is it possible or is there any one linux software company
that might be able to help me accomplish this?
 
Old 05-12-2013, 01:10 AM   #2
hilyard
Member
 
Registered: Jan 2010
Location: Inland PNW
Distribution: antiX 13.2 | Slacko 5.7
Posts: 273

Rep: Reputation: 61
Quote:
Originally Posted by errigour View Post
Is there a way that I can organize a mounted portion of my hardrive kind of like disk defragmenting . . .
I also want to zero out the rest of the mounted portion of my hardrive that is not being used?
Is it possible . . . ?
a) Bleachbit allows a "cleaning up" of files, but not defrag

b) First partition the portion of the hard drive to be wiped, noting the drive designation (e.g. /dev/sdaX, where X=integer) using either gparted or the like; then wipe it in terminal using the dd command
PHP Code:
dd if=/dev/zero of=/dev/sdaX bs=4096 conv=notrunc,sync 
Run gparted or the like again, and note that portion is an unknown, according to the partioner. Delete or format, as desired.

I use SystemRescueCD. AFAIK, no software to do what you say, per se, exists. (lol)

Best wishes!

Last edited by hilyard; 05-12-2013 at 01:14 AM. Reason: error
 
1 members found this post helpful.
Old 05-12-2013, 03:45 AM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
The usual way to zero out free space on a partition is to create a large file full or zeroes or random data:

Code:
dd if=/dev/zero bs=4M of=file; rm -f file
As for defragmenting, it depends on your filesystem. I also wrote a script that works for any filesystem.
 
2 members found this post helpful.
Old 05-12-2013, 03:53 AM   #4
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Squeeze, Wheezy
Posts: 244

Rep: Reputation: 46
I occasional back up my entire drive image. Zeroing out the unused bits makes the bzip2 or gzip compressed image much smaller. I just use "dd" after bleachbit:
Code:
cd /mount/point   # eg /home/user
dd if=/dev/zero of=./largefile bs=32M
This will fail once the available space has been used up. Then just:
Code:
rm ./largefile
I do not believe you need to be to concerned about fragmentation on an ext3 or ext4 drive. Particularly if it is a solid state drive.

Regards,
Stefan
 
1 members found this post helpful.
Old 05-13-2013, 12:31 PM   #5
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Squeeze, Wheezy
Posts: 244

Rep: Reputation: 46
Oops, I see H_TeXMeX_H beat me to it by by 8 min!
 
Old 05-14-2013, 02:14 PM   #6
errigour
Member
 
Registered: May 2009
Posts: 227

Original Poster
Rep: Reputation: 4
Thanks.
 
Old 05-14-2013, 02:27 PM   #7
errigour
Member
 
Registered: May 2009
Posts: 227

Original Poster
Rep: Reputation: 4
Hey is there any way to confirm the data on the partition?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Second Hardrive Die Woud Linux - Hardware 16 05-04-2005 09:58 AM
New Hardrive jerimya Linux - Newbie 9 07-23-2004 06:21 PM
hardrive citrus Linux - Hardware 3 01-18-2004 09:35 AM
How much Hardrive would I need? snatale1 Mandriva 2 12-10-2003 06:31 PM
New Hardrive ggramajo Linux - Software 4 10-21-2001 08:31 AM


All times are GMT -5. The time now is 02:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration