Last active
January 18, 2017 05:44
-
-
Save davidejones/406ec6c0efe900909a744f570fd95b1a to your computer and use it in GitHub Desktop.
useful bash 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
| # how-to-clean-log-file (http://unix.stackexchange.com/questions/92384/how-to-clean-log-file) | |
| > logfile | |
| cat /dev/null > logfile | |
| dd if=/dev/null of=logfile | |
| truncate logfile --size 0 | |
| # how to get a file octal permissions | |
| stat -c "%a" | |
| # check a makefile for tabs and line endings | |
| # it shows the presence of tabs with ^I and line endings with $ both are vital to ensure that dependencies end properly and | |
| # tabs mark the action for the rules so that they are easily identifiable to the make utility..... | |
| cat -e -t -v makefile_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment