echo -e "Size\tFiles\tDirectory";
paste <(du -sh ./*/ | sort -k2 | cut -f1) <(find ./*/ | cut -d/ -f2 | uniq -c | sort -k2 | awk '{print ($1-1)"\t"$2}') | sort -nk2
I need output of the above shell script in python code.
Is there a way to get the same output through python code or insert the above script in python code.
Also I need to insert the variable in place of path ./*/ i.e my path is in the variale e.g x=/usr/bin.