Skip to content

Commit f8f4d9e

Browse files
committed
simple script for list installed software with rpm cmd.
1 parent a4990bc commit f8f4d9e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

check_p.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python
2+
3+
import os
4+
import subprocess
5+
import sys
6+
7+
dir = sys.argv[1]
8+
9+
if not dir or not os.path.exists(dir):
10+
print("Please check the path: %s" % dir)
11+
sys.exit(1)
12+
13+
list = os.listdir(dir)
14+
15+
for item in list:
16+
subprocess.call('rpm -qf %s/%s' % (dir, item), shell = True)

0 commit comments

Comments
 (0)