12-27-2012
You are right.
-type f will make sure that find command returns only regular files in the output. I think it is a good practice to specify this option if you are looking only for regular files.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can i create a regular expression which can detect a new line charcter followed by a special character say * and replace these both by a string of zero length?
Eg:
Input File san.txt
hello
hi ... (6 Replies)
Discussion started by: sandeep_hi
6 Replies
2. Shell Programming and Scripting
Hi,
can anyone advise me how to shorten this:
if || ; then
I tried but it dosent seem to work, whats the correct way.
Cheers (4 Replies)
Discussion started by: jack1981
4 Replies
3. Shell Programming and Scripting
I have following content in the file
CancelPolicyMultiLingual3=U|PC3|EN
RestaurantInfoCode1=U|restID1|1
.....
I am trying to use following matching extression
\|(+)
to get this
PC3|EN
restID1|1
Obviously it does not work.
Any ideas? (13 Replies)
Discussion started by: arushunter
13 Replies
4. UNIX for Dummies Questions & Answers
how to find for a file whose name has all characters in uppercase after 'project'?
I tried this:
find . -name 'project**.pdf'
./projectABC.pdf
./projectABC123.pdf
I want only ./projectABC.pdf
What is the regular expression that correponds to "all characters are capital"?
thanks (8 Replies)
Discussion started by: melanie_pfefer
8 Replies
5. UNIX for Advanced & Expert Users
I have a flat file with the following drug names
Nutropin AQ 20mg PEN Cart 2ml
Norditropin Cart 15mg/1.5ml
I have to extract digits that are before mg i.e 20 and 15 ; how to do this using regular expressions
Thanks
ram (1 Reply)
Discussion started by: ramky79
1 Replies
6. UNIX for Dummies Questions & Answers
In regular expressions with grep(or egrep), ^ works if we want something in starting of line..but what if we write ^^^ or ^ for pattern matching??..Hope u all r familiar with regular expressions for pattern matching.. (1 Reply)
Discussion started by: aadi_uni
1 Replies
7. Shell Programming and Scripting
what elements does " /^/ " match?
I did the test which indicates that it matches single lowercase character like 'a','b' etc. and '1','2' etc.
But I really confused with that. Because, "/^abc/" matches strings like "abcedf" or "abcddddee".
So, what does caret ^ really mean?
Any response... (2 Replies)
Discussion started by: DavidHe
2 Replies
8. Shell Programming and Scripting
I have a file that I'm trying to find all the cases of phone number extensions and deleting them. So input file looks like:
abc
x93825
def
13234
x52673
hello
output looks like:
abc
def
13234
hello
Basically delete lines that have 5 numbers following "x". I tried: x\(4) but it... (7 Replies)
Discussion started by: pxalpine
7 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I need help with using grep and regular expressions....
I have a long list of about 1000 lines of Chinese flashcards. Here's a small excerpt:
意文 yìwén (given name)
貴姓 guìxìng (honorable surname)
貴 guì (honorable)
姓 xìng (one's surname is; to be surnamed; surname)
呢 ne (interrogative... (2 Replies)
Discussion started by: arduino411
2 Replies
10. Shell Programming and Scripting
I am new to shell scripts.Can u please help me on this req.
test_user = "Arun"
if
echo "test_user is a word"
else
echo "test_user is not a word" (1 Reply)
Discussion started by: chandrababu
1 Replies
LEARN ABOUT SUSE
hardlink
hardlink(1) General Commands Manual hardlink(1)
NAME
hardlink - Link multiple copies of a file
SYNOPSIS
hardlink [option]... [directory|file]...
DESCRIPTION
hardlink is a tool which replaces copies of a file with hardlinks, therefore saving space.
OPTIONS
-h or --help
print quick usage details to the screen.
-v or --verbose
More verbose output. If specified once, every hardlinked file is displayed, if specified twice, it also shows every comparison.
-n or --dry-run
Do not act, just print what would happen
-f or --respect-name
Only try to link files with the same (basename).
-p or --ignore-mode
Link/compare files even if their mode is different. This may be a bit unpredictable.
-o or --ignore-owner
Link/compare files even if their owner (user and group) is different. It is not predictable
-t or --ignore-time
Link/compare files even if their time of modification is different. This will retain the newest timestamp, unless -m or -M is given.
-m or --maximize
Try to maximize the link count of the files.
-M or --minimize
Try to minimize the link count of the files.
-x or --exclude
A regular expression which excludes files from being compared and linked.
-i or --include
A regular expression to include files. If the option --exclude has been given, this option re-includes files which would otherwise
be excluded. If the option is used without --exclude, only files matched by the pattern are included.
ARGUMENTS
hardlink takes one or more directories which will be searched for files to be linked.
BUGS
hardlink assumes that the trees it operates on do not change during operation. If a tree does change, the result is undefined and poten-
tially dangerous. For example, if a regular file is replaced by a device, hardlink may start reading from the device. If a component of a
path is replaced by a symbolic link or file permissions change, security may be compromised. Do not run hardlink on a changing tree or on a
tree controlled by another user.
AUTHOR
The program hardlink and this manpage have been written by Julian Andres Klode, and are licensed under the MIT license. See the code of
hardlink for further information.
0.2.0 2012-02-28 hardlink(1)