Sponsored Content
Top Forums UNIX for Dummies Questions & Answers search for hardlinks based on filename via find command Post 1694 by hunternjb on Saturday 24th of March 2001 11:41:50 PM
Old 03-25-2001
Error

I am using command substitution into a find command in a script where I have built a menu to do a bunch of tasks within my unix account. When I choose the options for to find a file/files that have the same inode of the entered filename, ie hardlinks, nothing shows up. When I choose the appropiate options to build my find command everything looks to be in order. I need to know how do I get the hard links to print out. Below is the segment of the menu that I use to build the find command for the find path -inum filename -print:

echo "\n Select the number of the search primary"

echo "\n 1) Search based on inodes (-inodes via filename)"

echo "\n Choice: \c"
read pchoice

case $pchoice in
1) srch_pri='-inum';;
esac

case $pchoice in
1) echo "Filename: \c";
read srch_arg;;
esac

echo "Select number of the action primary"

echo "\n 1) Display the current pathname (-print)"

echo "\n Choice: \c"
read achoice

case $achoice in
1) act_pri = '-print';;
esac

case $achoice in
1) act_arg='';;
esac

path =$HOME

find $path $srch_pri $srch_arg $act_pri $act_arg
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find filename based on file content

:confused: There is a flat file on my system which contains email addreses of people in my company. This file is utilized when sending notifications for various things. However nobody knows where this file is located or what it is named. The only thing we know is the email address of a user who... (4 Replies)
Discussion started by: kollerj
4 Replies

2. UNIX for Dummies Questions & Answers

Using find command for timestamp based search

Hi, I am writing a script where i need to list all the files that have a scecific timestamp. I get this time stamp from another file. Is it possible to do this with 'find' command? Please let me know your valuable inputs. Thanks Sunny. (1 Reply)
Discussion started by: sunny_03
1 Replies

3. UNIX for Advanced & Expert Users

Find and store files based on FileName and Modified Time

Hi, I am currently using the following command: files=(ls enuCPU??.????.exp ntuCPU??.????.exp) I need to now change the commmand to store the file names of files that have been modified before datetime equal to say '02/16/2008 20:30:00' What could I use? (2 Replies)
Discussion started by: edisonantus
2 Replies

4. UNIX for Dummies Questions & Answers

How to find function name based on word search

Hi All, I want to find out function name based on word. Here i ll give u one example I have several files based on below format. file will start and ends with same name only EX: file1.txt public function calculate1() { ---- ---- call Global Function1() ---- ---- } END... (9 Replies)
Discussion started by: spc432
9 Replies

5. Shell Programming and Scripting

how to get only filename in a recursively find command

Hi i would like to ask on how to accomplish the FF: I want to execute a find command recursively and only get the filename something like i want only the last field set if is used ever the fieldvset as an redirection from the output of the find command For example: dir1/dir2/filename1... (2 Replies)
Discussion started by: jao_madn
2 Replies

6. Shell Programming and Scripting

Howto get only filename from find command in Linux?

Hi every body! I would like to get only filename in the result of find command in Linux but I don't know howto. Tks so much for your helps. (5 Replies)
Discussion started by: nguyendu0102
5 Replies

7. Shell Programming and Scripting

Only filename from find command

Hi All When we use find command command in Unix we get the result as /home/user/folder/filename1 /home/user/folder/filename2 /home/user/folder/filename3 Is it possible that i only get the file name The expected output when using find command is filename1 filename2 filename3 I am... (13 Replies)
Discussion started by: parthmittal2007
13 Replies

8. Shell Programming and Scripting

Find command error having space in filename

Hi, I am working in solaris.I am using below script to copy the files from /usr/tmp to /usr/gm But while running this it is not considering the files list after the filename having space in them. Example:- compile_custom_pll.sh conv_data_sqlload.sh conv_sqlload.sh Copy of... (5 Replies)
Discussion started by: millan
5 Replies

9. Shell Programming and Scripting

Find the latest file based on the date in the filename

Hi, We've a list of files that gets created on a weekly basis and it has got a date and time embedded to it. Below are the examples. I want to find out how to get the latest files get the date and time stamp out of it. Files are PQR123.PLL.M989898.201308012254.gpg... (1 Reply)
Discussion started by: rudoraj
1 Replies

10. UNIX for Dummies Questions & Answers

How to find a file based on pattern & return the filename if found?

Hi all, I am a newbie here. I have this requirement to find a file based on a pattern then return the filename if found. I created a script based on online tutorials. Though, I am stuck & really appreciate if anyone can have a quick look & point me to the right direction? #Script starts... (10 Replies)
Discussion started by: buster_t
10 Replies
sagasu(1)																 sagasu(1)

NAME
sagasu - GNOME tool to find strings in multiple files SYNOPSIS
sagasu [string [dir]] DESCRIPTION
sagasu is a GNOME tool to find strings in a set of files. The user specifies the search directory and the set of files to be searched. Double-clicking on a search result launches a user command that can for example load the file in an editor at the appropriate line. The search can recurse into subdirectories and can optionally ignore CVS directories. Two optional command-line arguments can be given: the first is the initial search string and the second is the directory whose files will be searched. If only one argument is given, it is taken as the search string. No search is actually started, but the appropriate fields are initialized. Any subsequent arguments are ignored. More documentation is available through the application's Help menu. OPTIONS
--help display a help page and exit --version display version information and exit LICENSE
This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. AUTHOR
Pierre Sarrazin See the Sagasu Home Page: http://sarrazip.com/dev/sagasu.html BUGS
The files to be searches are still assumed to be in Latin-1, not in UTF-8. The same goes for the command-line arguments and the terminal to which Sagasu is connected, if applicable. HISTORY
Sagasu is a Japanese word that means "to search." June 19th, 2010 sagasu(1)
All times are GMT -4. The time now is 12:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy