sample code to display mounted devices


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sample code to display mounted devices
# 1  
Old 02-11-2011
Question sample code to display mounted devices

Hi all
I need to write shell script to list out the mounted devices for a particular user. As i am new to shell script please help me. Here the problem is sometime unmounted devices also will be displayed in fstab. How to rectify that? Can anybody help me?

Regards
Ilamathi
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with code to check if file systems are mounted

Hi I need to have a piece of code that check if all file systems are mounted or not. I have to pieces of information like the output of the bdfcommand, and the file /etc/fstab. The first is: bdf Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol3 2097152 266656... (3 Replies)
Discussion started by: fretagi
3 Replies

2. Ubuntu

display the mounted file system types

how can i list/display the mounted partitions in Ubunutu, mount command just display the devices but not the file system used. (4 Replies)
Discussion started by: XP_2600
4 Replies

3. Shell Programming and Scripting

1 usb stick -> 2 mounted devices

Hello, i am using a solaris thinclient that tries to connecting to a terminalserver. (RDP) Everything works fine, but the usb redirection. If i put in a usb stick i always get 2 usb-drives mounted. If i look in /tmp/SUNWut/mnt/<name of the host> i see 2 devices. One with the name of the... (2 Replies)
Discussion started by: anarcy
2 Replies

4. Solaris

Java api/sample code for sftp

I'm trying to find an api for Java to send/receive files via sftp. There are some available for purchase out there such as JScape, but I was hoping to find a free one. Does anyone know of one? I would also like to find an open source java example application that can send files via sftp. ... (2 Replies)
Discussion started by: JohnRodey
2 Replies

5. Shell Programming and Scripting

Can't use Text::CSV... any sample code out there?

I was looking at a library that lets me parse comma delimited csv files without a problem, but unfortunately, I'm not allowed to make use of that library. I understand that the library probably does something similar to a string split(), but I don't quite know what kind of regular expression is... (1 Reply)
Discussion started by: mrwatkin
1 Replies

6. Shell Programming and Scripting

bash script to get all mounted devices

Hi, to all I'm writing script with zenity to benchmark selected disk with tools like; hdparm, seeker (to found in here > How fast is your disk? | LinuxInsight) With this piece of code i try to get all mounted devices to variables to use it with selection menu, but i stuck and don't know how... (5 Replies)
Discussion started by: m0z4rt
5 Replies

7. UNIX and Linux Applications

Need the sample code for implementation of SFTP

Hi we need to implement SFTP through unix shell scripts. I have seen many posts, in which there is discussion about non-interactive,automated SFTP. Can anyone please send me the sample code for SFTP shell script. We are using SFTP to transfer the files from the host server to the target... (10 Replies)
Discussion started by: kumarm
10 Replies

8. Shell Programming and Scripting

How to display partition name on mounted on using this script

Hi All Guys.... root> df -k|grep /u0 /dev/vx/dsk/oradg/u02vol 12582912 8717924 3744252 70% /u02 /dev/vx/dsk/oradg/u01vol 8796160 5563610 3131556 64% /u01 /dev/vx/dsk/oradg/u04vol 10035200 1247888 8519534 13% /u04 /dev/vx/dsk/oradg/u03vol 12582912 2524060 9744542 21% ... (3 Replies)
Discussion started by: adzuanamir
3 Replies

9. UNIX for Dummies Questions & Answers

passthrough devices vs. named devices

I am having trouble understanding the difference between a passthrough device and a named device and when you would use one or the other to access equipment. As an example, we have a tape library and giving the command "camcontrol devlist" gives the following output: akx# camcontrol... (1 Reply)
Discussion started by: thumper
1 Replies
Login or Register to Ask a Question
devfs(7FS)							   File Systems 							devfs(7FS)

NAME
devfs - Devices file system DESCRIPTION
The devfs filesystem manages a name space of all devices under the Solaris operating environment and is mounted during boot on the /devices name space. The /devices name space is dynamic and reflects the current state of accessible devices under the Solaris operating environment. The names of all attached device instances are present under /devices. The content under /devices is under the exclusive control of the devfs filesystem and cannot be changed. The system may be configured to include a device in one of two ways: By means of dynamic reconfiguration (DR), using, for example, cfgadm(1M). For devices driven by driver.conf(4) enumeration, edit the driver.conf file to add a new entry, then use update_drv(1M) to cause the system to re-read the driver.conf file and thereby enumerate the instance. The device may be attached through a number of system calls and programs, including open(2), stat(2) and ls(1). During device attach, the device driver typically creates minor nodes corresponding to the device via ddi_create_minor_node(9F). If the attach is successful, one or more minor nodes referring to the device are created under /devices. Operations like mknod(2), mkdir(2) and creat(2) are not supported in /devices. FILES
/devices Mount point for devfs file system SEE ALSO
devfsadm(1M), vfstab(4), attach(9E) NOTES
The /devices name space cannot be unmounted. All content at or below the /devices name space is an implementation artifact and subject to incompatible change or removal without notifi- cation. SunOS 5.10 26 Oct 2004 devfs(7FS)