Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import sys
- import subprocess
- file_size = input("Podaj minimalny rozmiar pliku [MB]: ")
- max_results = input("Podaj ilość wyników: ")
- show_size = (" -exec du -sh {} ';'")
- head_result = ("| head -n"+max_results+" ")
- sort = ("| sort -rh ")
- m = "M"
- command = ("find / -xdev -type f -size +"+file_size+m+show_size + sort+head_result)
- print(subprocess.Popen(command, shell=True, stdout=subprocess.PIPE).communicate()[0].decode('utf-8').strip())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement