LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-12-2002, 01:18 PM   #1
tigermusti
LQ Newbie
 
Registered: Dec 2002
Posts: 3

Rep: Reputation: 0
Question How can I safely trim down /dev ?


I'm relatively new to Linux, so I hope you can help me out with this one.

I would like to run mondo on my RedHat 8.0 but I need about 30m extra free
space in my root directory, /usr , /home , /var /tmp are all under LVM in
their own logical volume. (/usr=ext2, /home=ext3, /var=reiser /tmp=reiser)
So I need to get this space by trimming down /dev , its a 114meg.

The problem is that I don’t know wich devices I REALY need (is $ls -l
--time=atime a safe way to determine this ?)

Or is there a better way to filter them ?


I also noticed that it's not possible to 'cp' a device is their any way I
can copy them so I could include them on a boot-disk generated by 'mindi'
(in case things go wrong) what about the sym-links ?


Can I loop-mount an iso image of a bootdisk ( is this safe to do or wil it
start booting my system again and/or worse ? ) I would like to edit the
included /etc/fstab so that I can use my second cd reader too (:
 
Old 12-12-2002, 01:25 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
114mb??!?! that is not possible. the entries in the /dev/ directory are not even really files, they have no size. if you have more than 1mb in there you have had somethign go very wrong.

i have 15252 entries in /dev, taking up a grand total of 332kb, made up of directory entries (4kb block) and some very basic system scripts.
 
Old 12-12-2002, 01:33 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
The /dev directory is a pseudo type file system, it shouldn't take up rarely any space at all. The files in there are basically only links to hardware devices on your system.

How are you getting the output that /dev is taking up 114 megs of space ?? But my advice, don't remove anything in that directory, it could make your system non-functional.
 
Old 12-12-2002, 01:33 PM   #4
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
If you don't believe him, then go to your /dev directory and issue the command du -ch ./ This lists every 'file' in there, how much space it physically takes up, and then totals it at the end for you. My system lists it as follows:
Code:
0       ./cpu
... (to many to list)
0       ./sg
0       .
0       total
 
Old 12-12-2002, 01:37 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
this whole "deleting dev entries" seems to have suddenly become really popular this last week huh?
 
Old 12-12-2002, 01:38 PM   #6
tigermusti
LQ Newbie
 
Registered: Dec 2002
Posts: 3

Original Poster
Rep: Reputation: 0
Yes I seems that I'v made a mistake , sorry for that to you all if i perform
du -hc /dev | tail -1 then i get a more modest 339
 
Old 12-12-2002, 01:39 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by acid_kewpie
this whole "deleting dev entries" seems to have suddenly become really popular this last week huh?
I was thinking the same thing myself. Maybe we should post a good howto on the Linux Filesystem..
 
Old 12-12-2002, 01:40 PM   #8
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
It is understandable from some points of view... it can be annoying and confusing having so many entries in there, when the majority will not be used. That is why I love devfs! It is a God send! Unfortunately, unless people have already experienced it, or are told about it, they will largely be unaware of devfs, and so 'removing entries' seems quite logical... even if potentially fatal!
 
Old 12-12-2002, 01:51 PM   #9
tigermusti
LQ Newbie
 
Registered: Dec 2002
Posts: 3

Original Poster
Rep: Reputation: 0
Oh damn I've been so stupid !! IT WILL NEVER HAPEN AGAIN ! but still than ks for the reactions.
 
Old 12-12-2002, 04:33 PM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Most things here seem to go in trends though, someone will read a thread, see how things go, run into problems and post similar questions regarding things they tried. It takes 1 or 2 coincidental similar questions to start the ball rolling, then it's a full on hit of very related questions, just like the "linux uses all my memory" questions that come and go.

Cool
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trim a line schneidz Programming 2 10-07-2005 06:47 PM
Java Problem on trim command k1ll3r_x Programming 2 09-12-2005 03:49 PM
I want to trim Linux distribution qadria Linux - Software 7 08-08-2005 07:45 AM
Cut the Slack - Making a Trim Desktop Makaelin Slackware 4 09-23-2004 02:53 AM
How to Trim mpeg video's ? qwijibow Linux - Software 1 01-06-2004 08:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:58 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