Last active
March 24, 2024 14:24
-
-
Save vinayakg/283a60f19887179684331784d24398ad to your computer and use it in GitHub Desktop.
Handy Linux commands that have been using for years
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
Find files size excluding folders in the current directory | |
`find . -name "*.*" -type f -depth 1 -exec du -ch {} +` | |
Batch file to delete files older than N days | |
`forfiles -p "C:\what\ever" -s -m *.* -d <number of days> -c "cmd /c del @path"` | |
Running a batch program in one line | |
`for i in seq 1 1000; do mysql -u root --password=bad -h 127.0.0.1 2>/dev/null; done` | |
List space occupied by dirs, at directory level | |
` | |
du -sh ``ls -d *\`` | |
<br> | |
du -hs ./* | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment