Skip to main content

Thread: bash: find function and formatting


i trying write bash program uses find function find files in designated folder has more 1 name (ie many links)

code:
find $1 ! -type d -links +2 -ls 2</dev/null
id output formatted line printed out node number followed line has files names. ie

inode1;
name1
name2
inode2;
name1
name2

have no idea how

something this:
code:
find .  ! -type d -links +1 -exec ls -i {} \; | awk '{ if(inode==$1) { print $2 } else { inode=$1; print inode ";"; print $2 }}'


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [other] bash: find function and formatting


Ubuntu

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support