Inspiration & Genius – One and the Same

Some Commands From Around the Web

Here’s a few commands that I either use, or have found around the web. Remember to test these out before you use them live. I have for my environment, but your environment might be totally different. Sorry to state the obvious! If you have more send them on!

Recursively change file permissions without affecting directory permissions

$find ./ -type f -exec chmod 633 {} ;

Find more than one file type in the current directory

$find . -maxdepth 1 -type f -name '*.sh' -o -name '*.txt'

Find all specific file types in a directory structure. This command is looking for music files.

$find -type f -printf '%P00' | egrep -iz '.(wav|mp3|aif|aac|aiff)$' | sort -z | xargs -0 ls -1

List all files opened by a command

$ lsof -c dhcp

List all files opened by a PID

$ lsof -c 15253

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Genesis Framework

Genesis Framework for WordPress

Studiopress Themes

Scribble Theme - A Beautiful Frame For Your WordPress Website

Advertisements