LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2012, 09:26 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Ho to delete "orphaned" files after switching /tmp from ext4 to tmpfs?


Currently my /tmp is placed as a subdirectory in / which is ext4. Sometimes there stays a lot of unused garbage which I have to delete by hand. I read this thread http://www.linuxquestions.org/questi...fs-4175439818/ with an interesting discussion of the merits of the use of tmpfs. So I want to use it, too.

But some of the files in my old /tmp are in use, so I can't delete them. So when I put
Code:
tmpfs /tmp tmpfs relatime,nodev,nosuid,size=20% 0 0
in /etc/fstab and reboot these files will stay on the disk and can't be reached (since they reside on the hard disk and the new tmpfs is in the RAM).

How can I get rid of them?
TIA .

<edit> Darn. How to... Sometimes I must be blind. Sorry. </edit>

Last edited by JZL240I-U; 12-17-2012 at 01:22 AM.
 
Old 12-13-2012, 10:06 AM   #2
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Normally you would boot in single user (maintenance mode) to do this kind of work.

Boot your system in single user. Umount the tmpfs. Clean out the /tmp dir. Reboot.
 
Old 12-14-2012, 06:29 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Works exactly as advised. Additional remark: I thought runlevel 1 needed a /tmp as well. Obviously it doesn't. Thanks for your help, marked as solved.
 
  


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
"too many session files in /var/tmp" pioniere Slackware 9 03-16-2023 06:45 PM
unpredictable "delete" "move to trash" or "cut" file menu option dorianrenato Linux - General 3 11-28-2011 06:41 PM
/etc/fstab "tmpfs /tmp tmpfs defaults 0 0" ramfs?! HOW? xcislav Linux - General 2 06-04-2011 03:03 AM
[SOLVED] "Insert" & "Delete" key returns "~" in a terminal. sharky Linux - General 15 04-26-2011 08:36 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:44 PM.

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