Last active
February 7, 2022 18:45
-
-
Save jiromm/ce628934a90433c56252 to your computer and use it in GitHub Desktop.
linux commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# top 30 largest files | |
du -sb * | sort -nr | head -30 | |
# directory count | |
ls -l | grep ^d | wc -l | |
# directory count (recursively) | |
ls -lR | grep ^d | wc -l | |
# directory size | |
du -ch | grep total | |
# empty trash | |
rm -rf ~/.local/share/Trash/* | |
# check free disk space | |
df -h | |
# Search the specific word in directory and show filenames | |
grep -H -R 'eval(' . | cut -d: -f1 | |
# Find suspicious PHP files | |
find . -type f -name "*.php" -exec grep --with-filename "eval(\|exec(\|base64_decode(" {} \; | |
./virus.php: eval(base64_decode($_GET['a'])); | |
# Find files | |
find . -print | grep -i '*.php' | |
# Search for a files which contains a word in directory | |
grep -r word * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment