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
Assuming you are using the Generic Phone, edit the following file : C:\Program Files\Macromedia\Flash 8\en\Configuration\Mobile\Devices\Generic_Phone.xml and change the line <device id="8502" width="176" height="208" heap="1024"> to <device id="8502" width="176" height="208" heap="2048"> Increase the heap value as necessary.
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-
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 : ...