diff --git a/dirs b/dirs index 7838938..ddc4053 100755 --- a/dirs +++ b/dirs @@ -35,6 +35,10 @@ unless (-d $dir_path) { die "$dir_path is not a directory\n" } +if ($dir_path eq '/') { + die "You are not able to run 'dirs' on the root directory\n" +} + my $total_size = 0; sub calculate_size {