Sponsored Content
Full Discussion: Refresh smb mounted volumes
Operating Systems OS X (Apple) Refresh smb mounted volumes Post 302567182 by deepstructure on Saturday 22nd of October 2011 11:32:23 PM
Old 10-23-2011
Refresh smb mounted volumes

I have found sometimes that the shell won't see updated folders on a smb share.

If I run a script (tsch), that checks the existence of folders:

Code:
foreach ITEM ( list of directories)
	if ! ( -e $ITEM ) then
		echo "$ITEM does not exist"
		echo ""
		set ERROR = 1
        endif

If the first time when this is run the directories don't exist, on subsequent runs it still reports the directory as non-existent, even when it has since been created.

Nothing seems to change this behavior - even hours later after the folders have been created. One thing will fix it tho - open up a finder window and navigate to that directory (or paste the path in "Go to the folder..."). Once the finder is there, the next run of the script will find that directory. But it still won't find the other entries, unless they were in the same directory path.

For the life of me I can't figure out how to get the shell to recognize these new paths. Restarting finder or Terminal doesn't work. Flushing caches doesn't work. Probably disconnecting and reconnecting the smb mounted volume would work, but that's a bit of a pain.

Is there any way to get the shell to refresh what must be it's cached copy of what's on the smb volume? I tried 'touch -ac' to no avail.

I've seen this occasionally before, but now I'm seeing it consistently with folders we have that are created by a Windows-based sync operation using uftp from a remote host. I don't normally have this problem with folders created by users of the same network.
 

6 More Discussions You Might Find Interesting

1. AIX

Refresh window?

Hi, for my first time using AIX, I haven't had much luck and I was wondering if I could get some urgent help. I had a terminal open and had allocated some space to a new volume group and then logical partition to "/foldername". I then went to go to netscape, so I typed that in the terminal and it... (0 Replies)
Discussion started by: JimmyFo
0 Replies

2. UNIX for Advanced & Expert Users

rsync not copying all files from smb-mounted fs

We have an old windows server here, with a relatively large share upon it (200GB, 1-2 million files). Our entire network is Linux (RH8.0) based, and we therefore automount this using the samba client. We have just begun migration to a linux fileserver, to save ourselves having to use lovely... (2 Replies)
Discussion started by: fishsponge
2 Replies

3. UNIX for Dummies Questions & Answers

Refresh ls list on screen (auto-refresh)?

I am looking for a way to issue a command or string of commands to repeatedly display new files that are written to the directory. I usually use ls -ltr to see the newest files at the bottom of the screen. I would like to automate this command to refresh what is displayed every second or so. Can... (3 Replies)
Discussion started by: skidude
3 Replies

4. Programming

ncurses refresh()

i have read in one of links, there its documented but i am using following code int main () { char ch; initscr(); printw("Enter a char :"); ch=getch(); printw("You Entered '%c' ",ch); getch(); endwin(); return 0; } the code does... (2 Replies)
Discussion started by: MrUser
2 Replies

5. Shell Programming and Scripting

Apache/CGI Bin Accessing mounted SMB share

Hey Guys, I need to copy some files from my Apache server to SMB share ... copy $file,"/Volumes/v1/x/test/$datestamp$name$suffix" Unfortunately this command when executed from Apache/cgi-bin is not able to access mounted volumes .. is there anything that can be done about that ... Can... (1 Reply)
Discussion started by: NDxiak
1 Replies

6. Red Hat

Related to "NAS" some file system (mounted volumes) were not writable

Dear friends, I have been facing an issue with one of my red hat unix machine, suddenly lost to switch sudo users. My all colleagues lost to switch to access sudo users. Then, we have realized its related to NAS issue which does not allowing to write the file. because of this we got so many... (1 Reply)
Discussion started by: Chand
1 Replies
NEW(1)								     [nmh-1.5]								    NEW(1)

NAME
new - report on folders with new messages fnext - set current folder to next folder with new messages fprev - set current folder to previous folder with new messages unseen - scan new messages in all folders with new messages SYNOPSIS
new [sequences] [-mode mode] [-folders foldersfile] [-version] [-help] fnext is equivalent to new -mode fnext fprev is equivalent to new -mode fprev unseen is equivalent to new -mode unseen DESCRIPTION
New in its default mode produces a one-line-per-folder listing of all folders containing messages in the listed sequences or in the sequences listed in the profile entry "Unseen-Sequence". Each line contains the folder, the number of messages in the desired sequences, and the message lists from the .mh_sequences file. For example: foo 11.* 40-50 bar 380. 760-772 824-828 total 391. The `*' on foo indicates that it is the current folder. The last line shows the total number of messages in the desired sequences. New crawls the folder hierarchy recursively to find all folders, and prints them in lexicographic order. Override this behavior by provid- ing foldersfile containing the pre-sorted list of folders new should check, one per line. In fnext and fprev modes, new instead changes to the next or previous matching folder, respectively. In unseen mode, new executes scan sequences for each matching folder. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory Current-Folder: To find the default current folder Unseen-Sequence: The name of the unseen message sequence SEE ALSO
scan(1), mh-format(5) HISTORY
Based on Luke Mewburn's new (http://www.mewburn.net/luke/src/new). MH.6.8 11 June 2012 NEW(1)
All times are GMT -4. The time now is 12:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy