Skip to content

Instantly share code, notes, and snippets.

@davidejones
Last active January 18, 2017 05:44
Show Gist options
  • Select an option

  • Save davidejones/406ec6c0efe900909a744f570fd95b1a to your computer and use it in GitHub Desktop.

Select an option

Save davidejones/406ec6c0efe900909a744f570fd95b1a to your computer and use it in GitHub Desktop.
useful bash commands
# 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