zarzax the blog

Tag: scripting

chmod recursively on directories or files using find

by Mark on May.06, 2009, under sysadmin

Sometimes its the little things that annoy us so much on the Unix command line.  One big question for me was… How to do you differentiate between directories and files when recursively chmod-ing?

The answer is simple.  But of course there are different ways to do the same thing.

Using the find command
find -name '*' -type d -exec chmod 0755 {} \;

NOTE: the -name ‘*’ parameter is used to keep from modifying the present working directory or ‘.’ directory.

find . -type f -exec chmod 0644 {} \;
(continue reading…)

1 Comment :, , , , more...

Scripting RSS Torrent Downloads

by Mark on Apr.16, 2009, under Software

the brazilian article that used the RH pix
Creative Commons License photo credit: irina slutsky

I had some interesting requirements for my Bittorrent needs.  First I wanted to move everything to my linux mediaserver/fileserver.  So I needed a way to work with bittorrent files without traditional access to the machine.  eg. No screen or windowing system.  This led me to TorrentFlux-b4rt, which is a php based web interface to Transmission client meant to be run on apache servers.  Second I wanted to ability to download torrents automatically from RSS sources using scripting.  This is where the original TorrentFlux had failed me and I went searching.

The following is a gathering of scripts I have found and tested.  Most scripts require that you have access to Cron scheduling and the python scripting language.  And, of course, a bittorrent client that scans a directory looking for torrent files.  I am using these scripts in conjunction with rTorrent (a commandline bittorrent client) as well as TorrentFlux-b4rt on various servers.

(continue reading…)

1 Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!