---
title: "linux查找文件的常用命令"
author: "lc0451"
date: "2010-11-09T11:34:32Z"
tags: []
categories: ["编程语言"]
slug: "linux"
draft: false
lastmod: "2010-11-09T11:34:32Z"
id: 806435
url: "https://lc0451.iteye.com/blog/806435"
---

find fromDir -iname "filename" -type f -exec grep "string" {} \\; -print

find . | grep "filename"

 

svn revert . -R

svn log --stop-on-copy url

svn merge -r 367768:head url --dry-run

 

mount的sh脚本：

#!/bin/bash

df

echo "输入管理员密码："

sudo /etc/init.d/nfs-common start

sudo mount 10.20.131.157:/home/admin /mnt/efs/www

sudo mount -t nfs -o rw 10.20.131.157:/home/admin/volume\_photobank /mnt/photobank

sudo mount -t nfs -o rw 10.20.131.157:/home/admin/volume\_product /mnt/product\_repository 

sudo mount -t nfs -o rw 10.20.131.157:/home/admin/volume\_wsproduct /mnt/wsproduct\_repository

echo "mount 成功!"

df

 

umount的sh脚本：

#!/bin/bash

df

echo "输入管理员密码："

sudo /etc/init.d/nfs-common start

sudo umount /mnt/efs/www

sudo umount /mnt/photobank

sudo umount /mnt/product\_repository 

sudo umount /mnt/wsproduct\_repository

echo "umount 成功!"