Posts Tagged: linux

Removing orphaned virtfs mounts

Posted by & filed under Linux.

Shows who is logged in: # who Anybody running a virtfs, or any orphaned virtfs users? cat /proc/mounts | grep virtfs Unmount them! for i in `cat /proc/mounts |grep virtfs |grep user_name_here |awk ‘{print$2}’`; do umount $i; done

Linux directory size

Posted by & filed under Linux.

To display the size of directory, including sub directories, eg, for /backup: du /backup -ch | grep total See

Finding large files in linux

Posted by & filed under Linux.

Here’s a bash script to do it: #!/bin/bash # if nothing is passed to the script, show usage and exit [[ -n “$1” ]] || { echo “Usage: findlarge [PATHNAME]“; exit 0 ; } # simple using find, $1 is the first variable passed to the script find $1 -type f -size +100000k -exec ls… Read more »