Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to know the device on which the file is located Post 302233623 by jim mcnamara on Monday 8th of September 2008 06:50:23 AM
Old 09-08-2008
So you do not know the path. df <path> will display the filesystem
Let's start with this
Code:
find / -name file.name -type f |\
while read fs junk
do
    path=$(dirname $file)
    grep "^$path"  /etc/mnttab
done

This will work if /etc/mnttab exists on your machine Otherwise we need the OS.
 

10 More Discussions You Might Find Interesting

1. Solaris

Where Xorg X-Lock file is located in Solaris?

I am using Xorg server with Solaris 10. After unnormal poweroff dtlogin tells: "The X-server can not be started on display :0" I am absolutelly sure it is because there is still a X-lock file from the previouse X-session somewhere, but I do not know where is it located in Solaris! :confused: (2 Replies)
Discussion started by: eugrus
2 Replies

2. Shell Programming and Scripting

Pls Help - Need to edit file located in several directories

I need to update an entry called "mail.RiskNavigatorFromEmailAddress" in all of the "Application.properties" files below, which are located in several different directories... Each of these Application.properties files has the following entry: ... (3 Replies)
Discussion started by: kthatch
3 Replies

3. UNIX for Dummies Questions & Answers

Deleting a file located on another server

Hi, I have successfully copied a file from one server to another using following command. user1@server1# scp test.jsp user2@server2:/home/ Now i want to delete that copied file(test.jsp) from "server2" by running some command from server1. Please help... (1 Reply)
Discussion started by: SanketJOSHI
1 Replies

4. Shell Programming and Scripting

Deleting a file located on another server

Hi, I have successfully copied a file from one server to another using following command. user1@server1# scp test.jsp user2@server2:/home/ Now i want to delete that copied file(test.jsp) from "server2" by running some command from server1. Please help... (2 Replies)
Discussion started by: SanketJOSHI
2 Replies

5. Shell Programming and Scripting

use awk to read randomly located columns in an excel file

Hi, I have an excel file that have a random count of columns/fields and what im trying to do is to only retrieve all the rows under 2 specific field headers. I can use the usually command for awk which is awk 'print{ $1 $2}' > output.txt, but the location of the 2 specific field headers is... (9 Replies)
Discussion started by: mdap
9 Replies

6. Shell Programming and Scripting

How do I go about finding a value located in one file in another?

Hi, I have to determine which VALID users made a failed loggon attempts on our server.To make a long story short, I have isolated the list of all the usernames and number of attempts in one file, and have isolated the valid users who have made failed loggon attempts in another file. I now have... (2 Replies)
Discussion started by: mojoman
2 Replies

7. UNIX for Advanced & Expert Users

Need help to change the content for remote located file

Hi All, I have one file that sits on 4 diffrent servers, those servers are diffrent region based and they are authentication protected and that file has a diff port numbers, so when run the script it must ask my login details,region of server and port no for that file once it took from me... (1 Reply)
Discussion started by: tmarjuna
1 Replies

8. Shell Programming and Scripting

Need help to change the content for remote located file

Hi All, I have a file that sits on 4 diffrent servers, those servers are diffrent region based and they are authentication protected and that file has a diff port numbers, so when run the script it must ask my login details,region of server and port no for that file once it took from me it... (1 Reply)
Discussion started by: tmarjuna
1 Replies

9. UNIX for Dummies Questions & Answers

sudo dmidecode where is the file located ?

Been through all my /sys /sbin /bin directories and can't seem to find it. (2 Replies)
Discussion started by: jcnewton13
2 Replies

10. Shell Programming and Scripting

Problem in appending text to a file located in remote server

ssh -q "server_name sudo echo 'dbagroup::1234' >> sudo /etc/group"if i execute the above code its not getting appended. my requirement is to login to remote server and append dbagroup::1234 in /etc/group i am able to achieve this with tee -a command want to know why its not working with >>... (5 Replies)
Discussion started by: chidori
5 Replies
netstrategy(1M) 					  System Administration Commands					   netstrategy(1M)

NAME
netstrategy - return network configuration information SYNOPSIS
/sbin/netstrategy DESCRIPTION
The netstrategy command determines the network configuration strategy in use on a system and returns information in a form that is easily consumable by a script. The command returns three tokens: <root filesystem type> <primary interface> <network config strategy> These tokens are described as follows: <root filesystem type> Type of filesystem that contains the bootable kernel, as would be specified in the fstype column of the mnttab(4). <primary interface> Name of the primary network interface. For a diskless machine, this is the interface used to load the kernel. <network config strategy> The means by which a system obtains its IP address for booting. This can be one of rarp, dhcp, or none. The netstrategy command is not intended for use on a command line. OPTIONS
The netstrategy command has no options. EXIT STATUS
0 Success. !=0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
ifconfig(1M), mnttab(4), attributes(5) SunOS 5.11 5 May 2007 netstrategy(1M)
All times are GMT -4. The time now is 05:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy