Saturday, 15 March 2014

To find symbolic link in a directory

to find symbolic link in a directory

 root@server [/home/user]# find . -type l
./access-logs
./www

root@server [/home/user]# find . -type l -printf " %p -> %l\n"
 ./access-logs -> /usr/local/apache/domlogs/user
 ./www -> public_html

root@server [/home/edennatu]# find . -type l -printf "%a -> %b\n"
Mon Jun 10 07:41:11 2013 -> 0
Mon Jun 10 07:41:11 2013 -> 0


%a       File's last access time in the format returned by the C 'ctime' function.

%b       The amount of disk space used for this file in 512-byte blocks. Since disk space is allocated in      multiples of the filesystem block size this is usually greater than %s/1024, but it can also be smaller if the file    is a sparse file.

%p       File's name.

%l         Object of symbolic link (empty string if file is not a symbolic link).

No comments:

Post a Comment