Find large folders
To find the 10 largest folders in the home directory : du -k /home/ | sort -n | tail -10
To find the 10 largest folders in the home directory : du -k /home/ | sort -n | tail -10
To recursively delete all files with a given extension (eg all .pyc files in a django application), use : find . -name "*.pyc" -exec rm '{}' ';' Change the “*.pyc” part to delete different file types.
Create a models folder under myApp. Delete models.py and add a model_name.py file in the models folder for each model model_name. Add the following to each model file : class Meta: app_label = 'myApp' Add a line in models/init.py for each model file : from myModelFile import myModel More information at djangoproject.com
Create a .bash_profile file in your home directory containing the following : . ~/.bashrc ENV=$HOME/.bashrc export ENV export TERM=xterm-color alias ls='ls -G' alias ll='ls -hl'
To recover your repository if you’re getting Corrupted error messages : $ sudo svnadmin recover /home/svn/repository/your_repository_name
Simple one-liner for getting the svn revision number - useful for shell scripts : svn log --revision "HEAD" | head -2 | tail -1 | awk '{print $1}' | cut -c 2-
Update There is a better walk-through for installing subversion with apache here . ...
A couple of useful functions for .bashrc : ...
Firstly, check that the vim-enhanced package is installed : rpm -qa | grep vim You should see something like : ...
...