++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Under current directory, there is a folder called .snapshot. When we run find command, we don't want to look into the .snapshot folder.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
IN SOLARIS,
Command:
find . -type d -name '.snapshot' -prune -o -print
Explanation:
-type d -name '.snapshot' : matching directory named .snapshot
-prune : Does not examine any directories or files in the directory structure below the pattern
just matched
-o : or (expr1 -or expr1)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
IN LINUX,
Command:
find . -path '\.\/\.snapshot' -prune -o -print
Explanation:
-path '\.\/\.snapshot' : matching directory named .snapshot
-prune : If -depth is not given, true; if the file is a directory, do not descend into it.
If -depth is given, false; no effect.
-o : or
Command:
find . -wholename '\.\/\.snapshot\/*' -prune -o -print
Explanation:
-wholename PATTERN : File name matches shell pattern PATTERN.
-prune : If -depth is not given, true; if the file is a directory, do not descend into it.
If -depth is given, false; no effect.
-o : or
Command: exclude ./.snapshot and ./root-audit
find . -path '\.\/\.snapshot' -prune -o -path '\./root-audit' -prune -o -print
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2009-02-02
WHY IS THIS BLOG SPACE?
I have tried several Blog spaces before, the earliest was back to 2004. Not even one last long. Why am I starting this one again?
First, I am learning hard to be Linux/Storage System Administrator. I need write notes, summary. Having a public space to post, it likes a reminder to keep me moving. Don't be lazy!
Second, I am using Google Documents, and I would like to publish some of my technical notes into the public. There is a link from Google Doc to post documents to Blogger, it is easier.
Third, I used to write in Chinese, my native language. Now, I am living in a English speaking country, I need improve my English. Writing, is always good for improving.
Then why Athabasca,
Athabasca is a river in north of Canada, finally drains into Arctic Ocean after 1231km journey. Living in a north country, you will be thinking about snow, ice, glacier, north pole, northen light. While such a river connecting the white icy Arctic world and the Rochie Mountain, it represents my dream about heading into the end of green world, or staring of while world.
First, I am learning hard to be Linux/Storage System Administrator. I need write notes, summary. Having a public space to post, it likes a reminder to keep me moving. Don't be lazy!
Second, I am using Google Documents, and I would like to publish some of my technical notes into the public. There is a link from Google Doc to post documents to Blogger, it is easier.
Third, I used to write in Chinese, my native language. Now, I am living in a English speaking country, I need improve my English. Writing, is always good for improving.
Then why Athabasca,
Athabasca is a river in north of Canada, finally drains into Arctic Ocean after 1231km journey. Living in a north country, you will be thinking about snow, ice, glacier, north pole, northen light. While such a river connecting the white icy Arctic world and the Rochie Mountain, it represents my dream about heading into the end of green world, or staring of while world.
Subscribe to:
Posts (Atom)