Tag Info

New answers tagged

0

Mount the hard drive first then navigate to the desired directories in it. To find out the hard drive use this command in the terminal fdisk -l Then mount the hard drive partition using mount /dev/partition_name /mnt You can now list the directories for the mounted partition for checking by ls /mnt Then cd to the desired directory in the /mnt ...


0

Launch terminal. Navigate to the directory containing the files: cd /directory. Use rm -f filename to permanently delete the files. The option -f will force the operation. Be sure to select the correct files you will not be able to undo. Repeat until you have cleared enough space; to check free space, use df -h.


0

Since Mac OS X doesn't have the -h option for sort, so I tried and learned sed and awk for a first attempt: du -sk * | sort -g | awk '{ numBytes = $1 * 1024; numUnits = split("B K M G T P", unit); num = numBytes; iUnit = 0; while(num >= 1024 && iUnit + 1 < numUnits) { num = num / 1024; iUnit++; } $1 = sprintf( ((num == 0) ? "%6d%s " : "%6.1f%s ...


2

There seem to be two possibilities here: You're being confused by the (admittedly confusing) behavior of df and root-reserved space You deleted (unlinked) one hardlink to the files, there are more. Personally, I suspect you're seeing #1. Details below, along with some concluding remarks. Confusing df behavior If you fill up a filesystem fully, as a ...


1

http://www.commandlinefu.com/commands/view/12927/list-the-size-in-human-readable-form-of-all-sub-folders-from-the-current-location says: du -ks $(ls -d */) | sort -nr | cut -f2 | xargs -d '\n' du -sh 2> /dev/null


1

Installing different packages on different partitions is technically doable but difficult. You could use a union mount to direct newly installed packages and package versions to a different filesystem while keeping everything visible at the normal location, but it's overkill. Instead of installing new packages in a different location, pick a large directory ...


0

You could first check if there is any big log file or similar taking too much space (su du and find to find it). If you are not able to reclaim space by any method (say apt-get clean, find if there is any big file with du -sh /* and then du -sh /bigger_directory/*, etc), then you could move /usr to a new partition on the same or in other disk. This is the ...


1

You don't want to do that. The first thing is to try to reclaim space under root. This is probably doable. To start with, cd to /var/cache/apt/archives and type du -hs. This will give the amount of space used by deb packages cached by apt. You can remove these manually or by using apt-get clean. There are also tools for removing large unused packages. For ...


1

apt-get(8) does not have a direct option to change the install directory. dpkg(1) does, but it is intended for a chroot environment. You could install normally and then move the application files, setting up symbolic links from the original locations to the new locations. This may not work for all applications. Also upon uninstall it may be an issue if you ...


-1

Hope these links will help you: Installing packages into local directory How to choose install location using “apt-get install” How to change the apt-get install directory


12

Gentoo is a Linux distribution that compiles packages from sources. Compiling packages requires much more space that installing pre-compiled binaries (that is, binaries that are compiled on the machines of the distribution maintainers). When you install something from the sources, you also need the sources for all the compilation dependencies. Almost all ...


0

I would have used rsync -avrz storage3 storage4 and then deleted the files afterwards, but I got another question why do you have those shares using NTFS filesystem if you are using Linux (Ubuntu) then I would have gone for ext4 or ReiserFS, ButterFS. IF those shares are located on a Windows box, please try and move those files from Windows to Windows using ...


0

You could try a tar to copy all the data, then remove it afterward: cd /media/storage3/; tar cfp - ./dir | ( cd /media/storage4; tar xfp - ) This will preserve all ownership, permissions and links


1

You could also try: sudo pvscan This will show you if any of the disks are in use by the logical volume manager. You can also use fdisk to determine which device corresponds to each physical drive: sudo fdisk -l /dev/sda sudo fdisk -l /dev/sdb sudo fdisk -l /dev/sbc sudo fdisk -l /dev/sdd


1

lsblk will show you the mountpoint of your disks.


0

A bind mount is equivalent to the original. There isn't one that's marked as the original and one that's marked as a copy. Bind mounts are like hard links in this respect, not like symbolic links. Since GNU coreutils 8.21 (if I read the changelog correctly), df strives to report each filesystem only once. Older versions included one entry per non-ignored ...


2

You don't need to open the log files in an editor to see what's flooding them. Just look at the last few lines: tail -n 999 /var/log/syslog | less Log files from a process always contain the process ID: Apr 10 00:00:01 harfang /USR/SBIN/CRON[345]: (root) CMD ( /usr/local/bin/midnight-stuff ) Apr 10 00:00:01 darkstar wibbled[1234]: I'm bored Apr 10 ...


3

There is actually a strong hint in the syslog snippet you posted. The end of the line Apr 10 00:53:37 MyMachine kernel: [11608.690733] [<ffffffffa08e4005>] ? ath9k_reg_rmw+0x35/0x70 [ath9k_htc] shows the stack trace is due to an unexpected error in a device driver named ath9k_htc. Hopefully, the kernel didn't panicked but the continuous repetition ...


-2

du is used more than df in day to day project as it shows the disk usage as per directory level. df is disk free space and shows at file system level. Another command is dfspace which would also be used.


7

You have a file with a funny name, probably starting with a -. Remember that globs (like *) are expanded by your shell, not the command being run. As an example, say you have: $ ls -1 foo -q Simple enough directory, with two files in it. (The -1 option to coreutils ls makes its output single-column.) When you run du -sh *, the shell notices that the ...


1

You can use du -mad 1 for your purpose. Like @Miline suggested, -a flag will show both files and directory. Using -d 1 will limit the output into only one layer of subdirectory(depth<=1), i.e. files of current folder and subfolder(without detail in content).



Top 50 recent answers are included