Created
October 29, 2021 08:04
-
-
Save abhitechno01/d15a2a93a82875926dfaea4a506dda2a to your computer and use it in GitHub Desktop.
ubuntu commands
This file contains hidden or 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 a string in a file pattern and replace it################### | |
| find . -name ".env" -exec sed -i 's/oldstring/newstring/gI' {} \; | |
| find . -name ".env" -exec grep -l 'your ip adddress' '{}' \; | |
| find . -name ".env" -exec cp {} bkup_env \; | |
| find . -name ".env" -exec grep -l 'email-smtp.us-east-1.amazonaws.com' '{}' \; | |
| ###################checking for file sizes and moving for the issue################ | |
| du -cha --max-depth=1 / | grep -E "M|G" | |
| #filesDon'tGetActuallyDeleted | |
| even if the df still not reflecting the deleted space, then it means some resource is using the file run the following and kill the process | |
| lsof +L1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment