Mounted to mac, doesn't show DIR contents on first 'ls'


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Mounted to mac, doesn't show DIR contents on first 'ls'
# 1  
Old 12-09-2013
Mounted to mac, doesn't show DIR contents on first 'ls'

Hi,

I have a cronjob that mounts machines every 15 minutes.

Code:
sudo mount -t cifs -o username=Ren_user,password=AIB#1109$,nounix,bg,sec=ntlmssp  //10.204.129.233/Desktop /mnt/clinical/234mac

When I open a new shell and
Code:
ls /mnt/clinical/234mac

to the mount point it is blank, but when I do the exact same thing again I can see files on the machine. This strange occurrence is keeping me from automating a data transfer from the macs. Does any one know what is going on?

I've attached a photo of it. It only happens in a new shell. After I suffer through one blank ls the occurrence never happens again, unless I open a new shell.
Mounted to mac, doesn't show DIR contents on first 'ls'-weirdmount3jpg
# 2  
Old 12-09-2013
What is the 'bg' option? I can't find any documentation on it.
# 3  
Old 12-09-2013
bg = background mount

bg = background mount

It's so when a machine is off and can't be mounted, it doesn't end my shell script, it just continues to the next mount.

http://unixhelp.ed.ac.uk/CGI/man-cgi?nfs+5
It's in that link, if you do a find for 'bg'

Last edited by jdilts; 12-09-2013 at 06:00 PM.. Reason: sp
# 4  
Old 12-09-2013
That's what it means for the NFS driver, yes. These options are all driver-specific and bg is not mentioned for cifs.
# 5  
Old 12-09-2013
That might explain why able to mount without any issues to the windows machines and not the macs. Is there a similar 'bg' command for cifs?
# 6  
Old 12-09-2013
It might be the mac doing some sort of timeout. I know NFS sometimes is done with an automount so it appears when it's used the same way -- the first try will return a blank ls, anything after will show the contents. The solution is to ls, wait a few seconds for it to attach, and continue.
# 7  
Old 12-10-2013
I'll try that. I'll ls then sleep and then see if it works

---------- Post updated 12-10-13 at 11:26 AM ---------- Previous update was 12-09-13 at 05:08 PM ----------

It's not working. I don't think it's a timeout because when I open another shell and mount to the same computer it does the same thing.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Why ls doesn't show catalog contents after mount (needed "cd .")?

Before I did mount /dev/sdc1 /mnt/ll xsi ll # ls xsi ll # cd . xsi ll # ls NEWGAME.GM2 install md5sum.txt syslinux.cfg ubnkern .... (1 Reply)
Discussion started by: Xcislav
1 Replies

2. UNIX for Dummies Questions & Answers

Why doesn't motd show up when I su to root?

When I do sudo -i isn't that like creating a root login shell session? Why isn't motd displayed? motd=message of the day. ---------- Post updated at 09:54 AM ---------- Previous update was at 09:25 AM ---------- I think I answered it myself, it is only called for remote login sessions, once... (2 Replies)
Discussion started by: glev2005
2 Replies

3. Emergency UNIX and Linux Support

Grub Doesn't show menu

Hi guys. I have installed Acronis disk director in windows XP and allocate some free space to install Debian beside fedora. after completion i rebooted and now grub is in command line mode and does not show the menu list. (I didn't remove the fedora partition. I just allocate some space from... (1 Reply)
Discussion started by: majid.merkava
1 Replies

4. UNIX for Advanced & Expert Users

Compiling VIM, doesn't show menu and toolbar.

I'm trying to compile vim73 with the Motif Toolkit. ./configure --enable-gui=motif make ./src/vim -g Vim runs in a window, without the standard toolbar and menu bar. I tried to recompile with ./configure --enable-gui=gnome2It compiled with GTK2 toolkit, but still no menubar, nor toolbar.... (0 Replies)
Discussion started by: mghis
0 Replies

5. UNIX for Dummies Questions & Answers

Will this show contents of file

Hi Team, I have a couple of questions. I happen to come across a code like this which i was asked to trouble shoot. Any idea what these two do? 1. cat $(file?File doesn't exist); 2. mydir=/home/user/axa032; echo $(mydir-/home/a2self); Can some one help me with this ? ... (2 Replies)
Discussion started by: kinny
2 Replies

6. Homework & Coursework Questions

Command Doesn't Show Description

im making c code in linux and im having problems with one command, id should bring up a list but instead id doesnt do nothing, there are no error's, can anyone solve whats wrong ? void environ() { extern char **environ; int i=0; for (i = 0; environ !=NULL;i++) { ... (1 Reply)
Discussion started by: figureout
1 Replies

7. IP Networking

Traceroute doesn't show gateway as hop

I have a Linux server connected to the Internet like so: Server (66.77.88.130) -> /29 VLAN Gateway (66.77.88.129) -> Core Router (64.0.0.1) -> Internet If I run a traceroute from my server to an arbitrary site on the internet I get a result like this: # traceroute some-other-server... (2 Replies)
Discussion started by: ramnet
2 Replies

8. HP-UX

ksh : permission denied on mounted dir

Hello, I have the following problem. I made a directory /mnt/appserv and mounted it on a windows server. The line in /etc/fstab to do this is the following : winoracle:/environments10g /mnt/appserv cifs defaults 0 0 I have mounted this dir as root-user. The rights on the directory are... (1 Reply)
Discussion started by: bdb78451
1 Replies

9. Post Here to Contact Site Administrators and Moderators

My sig doesn't show

Is there an issue with it? (2 Replies)
Discussion started by: Spetnik
2 Replies
Login or Register to Ask a Question