Difference between revisions of "Useful bash commands"
From RpWiki
(New page: == Commands == === Change permissions on files and folders with find === find . -type f -exec chmod 664 {} \; find . -type d -exec chmod 755 {} \;) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
find . -type f -exec chmod 664 {} \; | find . -type f -exec chmod 664 {} \; | ||
find . -type d -exec chmod 755 {} \; | find . -type d -exec chmod 755 {} \; | ||
+ | |||
+ | === ACL's === | ||
+ | set default folder rules for user media and group media | ||
+ | setfacl -R -m d:user:media:rwx,d:group:media:rwx folder/ | ||
+ | |||
+ | === Folder resize via imagemagick === | ||
+ | for file in *.jpg; do convert $file -resize 1600x1600 /exportfoler/$file; done; | ||
+ | |||
+ | === ccache ubuntu === | ||
+ | aptitude install ccache | ||
+ | |||
+ | and add the following to your .bashrc | ||
+ | if [ -d /usr/lib/ccache ]; then | ||
+ | export PATH=/usr/lib/ccache:"${PATH}" | ||
+ | export CCACHE_NLEVELS=3 | ||
+ | fi |
Latest revision as of 16:51, 6 May 2010
Contents
Commands
Change permissions on files and folders with find
find . -type f -exec chmod 664 {} \; find . -type d -exec chmod 755 {} \;
ACL's
set default folder rules for user media and group media
setfacl -R -m d:user:media:rwx,d:group:media:rwx folder/
Folder resize via imagemagick
for file in *.jpg; do convert $file -resize 1600x1600 /exportfoler/$file; done;
ccache ubuntu
aptitude install ccache
and add the following to your .bashrc
if [ -d /usr/lib/ccache ]; then export PATH=/usr/lib/ccache:"${PATH}" export CCACHE_NLEVELS=3 fi