Sponsored Content
Full Discussion: testing for remote fs
Top Forums Shell Programming and Scripting testing for remote fs Post 42857 by Ygor on Wednesday 5th of November 2003 12:02:22 PM
Old 11-05-2003
Maybe look at /etc/mnttab
 

10 More Discussions You Might Find Interesting

1. Solaris

Remote Dial-up Modem Printing With Out Cpu On The Remote Side!

I am looking for a dial-up remote printing solution as under : 1. We have a Centralized location where Sun Solaris (A) is installed. From here printing command will be despatched. 2. This printing command will be routed to WAN cloud to Main Branches (B1,B2,B3)and from there, printer at... (0 Replies)
Discussion started by: jayvee
0 Replies

2. Solaris

how to login with ssh to remote system with out applying the remote root/usr password

how to login with ssh to remote system with out applying the remote root/user password with rlogin we can ujse .rhosts file but with ssh howits possible plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

3. Debian

Launch remote gui apps in remote hosts

Hi, I've been looking for a way to execute a console program (is in windows but by now I accept the linux way) from a linux machine, but this program has to be opened in the remote side. Linux machine acts only as a "signaling" host. My program has to open the camera in the remote side, but only... (7 Replies)
Discussion started by: zauberberg
7 Replies

4. Shell Programming and Scripting

Triggering remote UNIX shell script from Remote desktop

I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like ssh hostname path ksh HC_Report.ksh>out.html ...but it generates the HTML file in remote desktop .i... (2 Replies)
Discussion started by: navsan
2 Replies

5. UNIX for Dummies Questions & Answers

Remote FTP Backup -Tar archive+ encrypt+ split to a remote ftp

I have a huge directoy(200+ gb) for backup. I want upload the tar file(split files) simultaneous to a remote ftp. (pipeline, stdout, stdin etc.) I don't want write a data to local hdd. I have a ssd hdd. thanks. this code doesn't work.( yes i know the problem is split command!) tar cvzf -... (8 Replies)
Discussion started by: tara123
8 Replies

6. Shell Programming and Scripting

How to store remote variable from remote cat file ??

I am trying to cat on a file located on remote server and assign it to remote variable. I have both local and remote variables. Running below script from local. test.sh J_NAME=XXX2 J_IP=XXX ssh $J_IP "ps auxw |grep java | grep -v grep |grep $J_NAME | awk '{print ... (2 Replies)
Discussion started by: oraclermanpt
2 Replies

7. Shell Programming and Scripting

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

8. Shell Programming and Scripting

Script connect to remote server, not find files and exit only from remote server, but not from scrip

I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies

9. Shell Programming and Scripting

awk remote multiple hosts print remote hostname and output

Hi all, i'm trying to gether multiple pattern on remote hosts, and trying to print hostname and the pattern, ssh remoteserver1 -C 'hostname 2>&1;cat /var/log/server1.log | awk -F ";" '"'"'{ print " "$2" "$5}'"'"'| sort | uniq -c | sort -g -r ' The output is the following, remoteserver1 ... (8 Replies)
Discussion started by: charli1
8 Replies

10. UNIX for Beginners Questions & Answers

scp auto logon to remote using remote authorized_keys

Hi~ i have an authorized key which it made remote host(B). i want log on without password from local(A) to the remote host(B) using authorized key of remote host. what shell i do? anybody help me. (1 Reply)
Discussion started by: tomato00
1 Replies
getmntent(3C)						   Standard C Library Functions 					     getmntent(3C)

NAME
getmntent, getmntany, getextmntent, hasmntopt, putmntent, resetmnttab - get mounted device information SYNOPSIS
#include <stdio.h> #include <sys/mnttab.h> int getmntent(FILE *fp, struct mnttab *mp); int getmntany(FILE *fp, struct mnttab *mp, struct mnttab *mpref); int getextmntent(FILE *fp, struct extmnttab *mp, int len); char *hasmntopt(struct mnttab *mnt, char *opt); int putmntent(FILE *iop, struct mnttab *mp); void resetmnttab(FILE *fp); DESCRIPTION
getmntent() and getmntany() The getmntent() and getmntany() functions each fill in the structure pointed to by mp with the broken-out fields of a line in the mnttab file. Each line read from the file contains a mnttab structure, which is defined in the <sys/mnttab.h> header. The structure contains the following members, which correspond to the broken-out fields from a line in /etc/mnttab (see mnttab(4)). char *mnt_special; /* name of mounted resource */ char *mnt_mountp; /* mount point */ char *mnt_fstype; /* type of file system mounted */ char *mnt_mntopts; /* options for this mount */ char *mnt_time; /* time file system mounted */ Fields with no actual content in /etc/mnttab are represented in the file as "-". To clearly distinguish empty fields, getmntent() set the corresponding field in mp to NULL. Each getmntent() call causes a new line to be read from the mnttab file. Successive calls can be used to search the entire list. The getmn- tany() function searches the file referenced by fp until a match is found between a line in the file and mpref. A match occurs if all non- null entries in mpref match the corresponding fields in the file. These functions do not open, close, or rewind the file. getextmntent() The getextmntent() function is an extended version of the getmntent() function that returns, in addition to the information that getmn- tent() returns, the major and minor number of the mounted resource to which the line in mnttab corresponds. The getextmntent() function also fills in the extmntent structure defined in the <sys/mnttab.h> header. For getextmntent() to function properly, it must be notified when the mnttab file has been reopened or rewound since a previous getextmntent() call. This notification is accomplished by calling resetmnttab(). Otherwise, it behaves exactly as getmntent() described above The data pointed to by the mnttab structure members are stored in a static area and must be copied to be saved between successive calls. hasmntopt() The hasmntopt() function scans the mnt_mntopts member of the mnttab structure mnt for a substring that matches opt. It returns the address of the substring if a match is found; otherwise it returns 0. Substrings are delimited by commas and the end of the mnt_mntopts string. putmntent() The putmntent() function is obsolete and no longer has any effect. Entries appear in mnttab as a side effect of a mount(2) call. The func- tion name is still defined for transition purposes. resetmnttab() The resetmnttab() function notifies getextmntent() to reload from the kernel the device information that corresponds to the new snapshot of the mnttab information (see mnttab(4)). Subsequent getextmntent() calls then return correct extmnttab information. This function should be called whenever the mnttab file is either rewound or closed and reopened before any calls are made to getextmntent(). RETURN VALUES
getmntent() and getmntany() If the next entry is successfully read by getmntent() or a match is found with getmntany(), 0 is returned. If an EOF is encountered on reading, these functions return -1. If an error is encountered, a value greater than 0 is returned. The following error values are defined in <sys/mnttab.h>: MNT_TOOLONG A line in the file exceeded the internal buffer size of MNT_LINE_MAX. MNT_TOOMANY A line in the file contains too many fields. MNT_TOOFEW A line in the file contains too few fields. hasmntopt() Upon successful completion, hasmntopt() returns the address of the substring if a match is found. Otherwise, it returns 0. putmntent() The putmntent() is obsolete and always returns -1. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
mount(2), mnttab(4), attributes(5) SunOS 5.11 22 Mar 2004 getmntent(3C)
All times are GMT -4. The time now is 03:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy