#!/usr/bin/perl # Find all the files under profiles directory my $path_dir = $ARGV[$1]; my $ls_lR_output = `/usr/bin/du $path_dir`; my @lines = split(/\n/, $ls_lR_output); foreach my $line (@lines) { $line =~ m{^\d+\s+(\S+)$}; my $DIR = $1; my $SVN = `echo $DIR | grep .svn`; if ($SVN eq '') { my $ls_sub_dir = `ls $DIR`; my @cleanlines = split(/\n/, $ls_sub_dir); foreach my $cleanline (@cleanlines) { if (-f "$DIR/$cleanline") { `/usr/bin/dos2unix $DIR/$cleanline`; } } } }