Sponsored Content
Top Forums Programming Ignoring symbolic/hard links while scanning through a directory Post 64797 by Perderabo on Wednesday 2nd of March 2005 11:52:55 AM
Old 03-02-2005
ino_t is ino_t. You're not supposed to care if it's an int or a long or whatever. Just build an array of ino_t. And compare elements of that array to your inode. I would use statbuf.st_ino by the way. If you really can't stand not knowing, take a peek at your include file. It can vary from system to system and I don't know what you're using.

And remember, if statbuf.st_nlink == 1, you can bypass all of the array checking. In most directories most files have only one link. Scanning an in-core array is fast. And fast or not, it's the only way you're going to avoid reprocessing a file with multiple links.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

links: (soft, hard? symbolic??) inode

Hi, what is link? and soft link? how about hard one and symbolic link. and inode. i get confuse about this links. could anyone help me with full explainsion? thks Gusla (5 Replies)
Discussion started by: gusla
5 Replies

2. AIX

Symbolic Links

I am linking a directory as follows: ln -sf /home/xxx/userid/real_files/* /home/xxx/userid/linked_files This gives me symbolic links for all the files in the real_files directory in the linked_files directory. My question is, if I go and remove a file in the real_files directory and then go... (1 Reply)
Discussion started by: rcarnesiii
1 Replies

3. Solaris

symbolic links between servers

Hi Guys... I want to create a link using ln -s for a directory that does not exist on the box. How do I do that? I had some files from Box A directory /d1/u01 and I copied the files across to another Box lets say Box B on directory /d2/u02. Now I want a link so that this path /d1/u01... (2 Replies)
Discussion started by: Phuti
2 Replies

4. UNIX for Dummies Questions & Answers

Symbolic Links

Hi all, I have scoured the entire forum for this but to no avail unfortunately. Basically, I would like to remove my symbolic link from my folder name i.e. foldername -> /a/b/c/d/f where f is indeed a folder. I have tried rmdir but this does not work and in actual fact deletes the... (4 Replies)
Discussion started by: cyberfrog
4 Replies

5. UNIX for Dummies Questions & Answers

Deleting Symbolic and/or Hard links

From what I understand a symbolic link is alot like a shortcut where it points to another file. if the original file is deleted the symbolic link is rendered useless but a symbolic link can be deleted without any problem. A hard link is like a copy of the file itself but pointing to the same... (3 Replies)
Discussion started by: cue
3 Replies

6. Windows & DOS: Issues & Discussions

gVim on windows 7 64 constantly overwrites symbolic and even hard links

I use sugarsync to sync my vimrc across computers. I keep the _vimrc file in a syncing folder and in my home folder, I have a symbolic link ~\_vimrc pointing to ~\Synced Docs\_vimrc. On my mac I have a .vimrc symbolic link pointing at the _vimrc file. On the pc side, every time I open the _vimrc... (3 Replies)
Discussion started by: dp88
3 Replies

7. Shell Programming and Scripting

print summary of directory, and group all symbolic links

I am trying to get a summary of filetypes in a directory, but the total count of symbolic links is not working. I am stuck at the results of the file command. I have used the find command to confirm my expectations, but my bash function is not giving the results I want. Here is my function:... (2 Replies)
Discussion started by: AlphaLexman
2 Replies

8. Solaris

Hard Links and Soft or Sym links

When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies

9. AIX

List all the soft links and hard links

Hi I'm logged in as root in an aix box Which command will list all the soft links and hard links present in the server ? (2 Replies)
Discussion started by: newtoaixos
2 Replies

10. Solaris

Symbolic links

Soft link,Hard link brief explanation (1 Reply)
Discussion started by: RAJU KAVATI
1 Replies
VFS_SCANNEDONLY(8)					    System Administration tools 					VFS_SCANNEDONLY(8)

NAME
vfs_scannedonly - Ensures that only files that have been scanned for viruses are visible and accessible to the end user. SYNOPSIS
vfs objects = scannedonly DESCRIPTION
This VFS module is part of the samba(8) suite. The vfs_scannedonly VFS module ensures that only files that have been scanned for viruses are visible and accessible to the end user. If non-scanned files are found an anti-virus scanning daemon is notified. The anti-virus scanning daemon is not part of the Samba suite. Scannedonly comes in two parts: a samba vfs module and (one or more) daemons. The daemon scans files. If a certain file is clean, a second file is created with prefix .scanned:. The Samba module simply looks if such a .scanned: file exists, and is newer than the pertinent file. If this is the case, the file is shown to the user. If this is not the case, the file is not returned in a directory listing (configurable), and cannot be opened (configurable). The Samba vfs module will notify the daemon to scan this file. So what happens for the user in the default configuration. The first time a directory is listed, it shows files as 'file is being scanned for viruses, but after the first time all files are shown. There is a utility scannedonly_prescan that can help you to prescan all directories. When new files are written the daemon is notified immediately after the file is complete. If a virus is found by the daemon, a file with a warning message is created in the directory of the user, a warning is sent to the logs, and the file is renamed to have prefix .virus:. Files with the .virus: prefix are never shown to the user and all access is denied. This module is stackable. CONFIGURATION
vfs_scannedonly relies on a anti-virus scanning daemon that listens on the scannedonly socket (unix domain socket or UDP socket). OPTIONS
scannedonly:domain_socket = True Whether to use a unix domain socket or not (false reverts to use udp) scannedonly:socketname = /var/lib/scannedonly/scan The location of the unix domain socket to connect to scannedonly:portnum = 2020 The udp port number to connect to scannedonly:scanhost = localhost When using UDP the host that runs the scanning daemon (this host needs access to the files!) scannedonly:show_special_files = True Whether sockets, devices and fifo's (all not scanned for viruses) should be visible to the user scannedonly:rm_hidden_files_on_rmdir = True Whether files that are not visible (.scanned: files, .failed: files and .virus: files) should be deleted if the user tries to remove the directory. If false, the user will get the "directory is not empty" error. scannedonly:hide_nonscanned_files = True If false, all non-scanned files are visible in directory listings. If such files are found in a directory listing the scanning daemon is notified that scanning is required. Access to non-scanned files is still denied (see scannedonly:allow_nonscanned_files). scannedonly:scanning_message = is being scanned for viruses If non-scanned files are hidden (if scannedonly:hide_nonscanned_files = True), a fake 0 byte file is shown. The filename is the original filename with the message as suffix. scannedonly:recheck_time_open = 50 If a non-scanned file is opened, the vfs module will wait recheck_tries_open times for recheck_time_open milliseconds for the scanning daemon to create a .scanned: file. For small files that are scanned by the daemon within the time (tries * time) the behavior will be just like on-access scanning. scannedonly:recheck_tries_open = 100 See recheck_time_open. scannedonly:recheck_time_readdir = 50 If a non-scanned file is in a directory listing the vfs module notifies the daemon (once for all files that need scanning in that directory), and waits recheck_tries_readdir times for recheck_time_readdir milliseconds. Only used when hide_nonscanned_files is false. scannedonly:recheck_tries_readdir = 20 See recheck_time_readdir. scannedonly:allow_nonscanned_files = False Allow access to non-scanned files. The daemon is notified, however, and special files such as .scanned: files. .virus: files and .failed: files are not listed. EXAMPLES
Enable anti-virus scanning: [homes] vfs objects = scannedonly scannedonly:hide_nonscanned_files = False CAVEATS
This is not true on-access scanning. However, it is very fast for files that have been scanned already. VERSION
This man page is correct for version 4.0.0 of the Samba suite. AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Scannedonly was developed for Samba by Olivier Sessink. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. Samba 4.0 06/17/2014 VFS_SCANNEDONLY(8)
All times are GMT -4. The time now is 08:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy