Tag Info

New answers tagged

1

You can use ncdu itself! This shows the uncompressed sizes of the files. In the case you say you care about, namely many uncompressible files, it should reflect what you need pretty well: Too make the file sizes accessible to ncdu, they need to be in a file system. So we need to mount the archive as a file system. We use a fuse user-space filesystem ...


1

There is another, and suprprisingly not well-known source of the unneeded disk writes in the linux world. And this is the uneededly fast write cache writeout. You can make it much more seldom if you write the following into /etc/sysctl.conf: vm.dirty_background_ratio = 20 vm.dirty_expire_centisecs = 360000 vm.dirty_writeback_centisecs = 360000 On your ...


-1

Best would be to change your hard drive into ssd. Usually in every laptop you can change hdd without any trouble. This will speed up your laptop and reduce power consumption a lot and will remove annoying HDD noise. Answering your original question: in fact the HDD only consumes 3-5 watts (SSD <1 Watt) while CPU 30 watts, motherboard 20 watts and memory ...


1

I think you want something like this: (until findmnt . ; do cd .. ; done) The problem you're running into is that all paths are relative to something or other, so you just have to walk the tree. Every time. findmnt is a member of the util-linux package and has been for a few years now. By now, regardless of your distro, it should already be installed on ...


1

It can be somewhat messy if the mount points contain blanks, but this should work except in cases where the mount points contain newlines: #!/bin/sh mountpoint="$(df -P "$1" | awk '{ if (NR==1) i=index($0,"Mounted on"); else print substr($0,i); }')" mount|grep " on ${mountpoint} type " df -P outputs one line for the filesystem; ...


1

I don't know of a command, but you could create a function. You can add the below to your .bashrc: mountinfo () { mount | grep $(df -P "$1" | tail -n 1 | awk '{print $1}') } This executes the mount command and passes the output to grep. grep will look for the output of df -P "$1" | tail -n 1 | awk '{print $1}', and to break it down: df -P "$1" will ...


1

The Linux/Unix way is to have a toolbox of small utilities that, when combined, give you the results that you're after. They tend not to have an utility for every occassion. Instead you have many small useful utilities that are combined together with pipes etc. The advantage of this is that you can write your own utility quite easily if none are available. ...


0

I don't know of a one-stop command line solution, although all the tools exist (apt-cache depends --installed, apt-cache rdepends --installed --recurse, apt-mark showmanual, dpigs, etc.). It would be possible to hack together a command line script that could attempt to find large packages with few manually installed reverse dependencies. Here's the proof of ...


1

I believe this is called "rounding".


3

The behavior you describe can be caused by applications holding files open even after they've been deleted. If an application has a file open (e.g. tail), and another application comes along and deletes the file (e.g. rm), the first application will continue to hold a reference the file until the first application closes the file. At that point, the ...


1

You told du to output sizes in k, so the file is most likely smaller than 4K, but occupies that much space on disk.


0

If you meant /root as the directory then, you would need to create a new partition on the hard drive with fdisk or parted and assign it to be mounted as /root in either during install process or manually in /etc/fstab file. This way the mount point /root will be consuming just that partition. along this how to will suffice. ...


5

The information that df produces comes from the statvfs() system call. If your embedded system does not have the df command installed, perhaps it has one of the common scripting languages, using which you can write a one-liner to access the same system call? python -c 'import os; print os.statvfs("/")' If it doesn't have anything like that installed ...


2

It should be mkfs.vfat -I /dev/sdb. sdb1 indicates you probably have more than one partition, and you're just formatting the first one, which happens to be 64MiB.


2

You can safely delete all files ending in .gz or .<number>. You might want to adjust your logrotate configuration. Please paste the contents of /etc/logrotate.conf and/or /etc/logrotate.d/*.conf (star means any file) so we can help further.


2

Looks like a bunch of log files are out of control; kern.log, message, ufw.log, and syslog. Take a look inside them to see what is filling them up with so much information. Since ufw.log is so big, it's likely a firewall related problem. Note the the .1 files are rotated logs; they are the old log files that were moved out of the way for new ones. Once ...



Top 50 recent answers are included