random unix notes

Tue 08 April 2014

This is a reminder for me, that can be useful for other

use of inode number

A solution found here is based on the find command and its -exec option, but other action are built in.
As always, take care of shell specific built in command, and specify the absolute path to the find command.
Few examples:
  • delete file: find -inum <inonde_number> -delete
  • rename/move: find -inum <inode_number> -exec mv {} <new_name> ;

regex

A tutorial can be found here .

run-parts behavior

In some distribution, the run-parts exclude all files matching *.sh$ .
My solution is to create a file named glu with the following content:
#!/bin/sh
for i in *sh
do
  sh $i $1
done

Related articles (or not):

Category: tools Tagged: Inode Unix