SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Abuse? Criminal offense? Seriously!
We were talking about /tmp usage comparable to the main memory size. As the main memory size is usually 0.1~1% of the disk size, so you mean filling up 0.1~1% of the disk space is just a sign of abuse?
The only one who has mentioned "Criminal offense" is yourself.
abuse (verb): to use wrongly or improperly. My use of the word was correct.
Even /usr/src is a better place to compile software than /root because it's bad practice to mount /root on a separate filesystem but it's the contrary for /usr/src.
This seems to work. Beware of glob and bash loops: you have to be super-duper sure it treats filenames with spaces, tabs, and new lines right. Would this be OK, I wonder?
I have a 250GB hard drive:
20GB /root
1GB swap
1.5GB tmpfs (default)
remaining GB /home
Sometimes I remove /tmp/SBo/ but everything else in it remains. Gives me a quick view of the extra stuff I have installed. That and my /home/Slackbuilds directory. Doesn't get in my way a bit.
(about my question regarding deleting SBo in /tmp)
Absolutely. In fact, I would recommend it. Files generated by sbopkg take a ton of space in /tmp. And none of them are used after it installs the packages it built.
Thanks, done and everything's working normally still and I gained 13GB, heh.
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928
Rep:
Quote:
Originally Posted by rg3
Not really. Let's say I populate a directory with two files named "foo" and "bar\nbaz", that is, "bar<newline>baz", and I have a script with the following contents:
Code:
#!/bin/sh
for f in `ls`; do echo rm -fr "$f"; done
Running the script yields:
Code:
rm -fr bar
rm -fr baz
rm -fr foo
I'm not making things up. I just tested this.
You are convincing me that quotes doesn't work always but how did you create that file with new line in the name?
I tried touch foo\nbar , touch foo\\nbar , touch "foo\\nbar" , touch "foo\nbar" , without success.
I was looking at the ls options again, and there is this option "-Q" (and --quoting-style=WORD) that I think is very
usefull, it encloses the names with spaces in double (or single) quotes.
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928
Rep:
Quote:
Originally Posted by qweasd
Code:
touch $'foo\nbar'
didn't work
Code:
paulo@paulo:~/Isos$ touch $'foo\nbar'
paulo@paulo:~/Isos$ v
total 0
-rw-r--r-- 1 paulo users 0 Ago 1 13:04 foo\nbar
paulo@paulo:~/Isos$ for i in `ls`;do echo rm -rf "$i";done
rm -rf foo\nbar
paulo@paulo:~/Isos$ for i in `ls`;do echo rm -rf $i;done
rm -rf foo\nbar
But if I type directly with tab auto-completing, the "\n" appears like a real new line
Code:
paulo@paulo:~/Isos$ rm 'foo
bar'
Well, now I know that there are characters that quotes doesn't handle, I will be more careful.
... though anything that is going to use a large amount of disk space like that really should be assigned it's own dedicated space so as not to impact the rest of the system and/or its users)
You forgot the I/O bandwidth, CPU power to deal with these data, etc. "Not to impact the rest of the system" is simply impossible.
Quote:
Originally Posted by GazL
but it's more common that a large amount of data collecting in /tmp is just a sign of abuse of the filesystem.
I repeat my last post: Filling the filesystem by 0.1% is far from abuse. Storage is there to be filled, money is there to be spent, life is there to be lived. If anyone don't agree, don't live.
Quote:
Originally Posted by GazL
If the programs using /tmp have been correctly written, then in theory you should be able to remove the files in /tmp at any time - even while the programs are still running and it shouldn't cause a problem ...
Who told you this? I've never heard of this nonsense before.
Paulo2, may be my bash-fu is lacking, but I don't see a way around it without find -print0, which is guaranteed to work at least on ext, since the latter forbids zero chars in file names. OTOH, parsing the output of /bin/ls seems like a rather nasty problem, because it separates file names with new lines, and file names may contain new lines, spaces, tabs, quotes, and what have you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.