最新消息:VPS服务器又从fzhost.net换回Linode了,主题仍用朋友推荐的大前端D8

[已解决]用grep命令查找当前文件夹及其下子文件内文件中的内容

Linux crifan 110浏览 0评论

参考:

linux grep命令详解 – ggjucheng – 博客园

linux中grep命令 – ITSTAR – 博客频道 – CSDN.NET

最后用:

licrifandeMacBook-Pro:JianDao crifan$ grep -r "/Users/crifan" *
Binary file JianDao.xcodeproj/project.xcworkspace/xcuserdata/crifan.xcuserdatad/UserInterfaceState.xcuserstate matches
licrifandeMacBook-Pro:JianDao crifan$ 

后来又去试了试其它的:

licrifandeMacBook-Pro:JianDao crifan$ grep -r "crifan" *
AddDropdownListView.swift://  Created by licrifan on 15/11/4.
AddDropdownListView.swift://  Copyright © 2015年 licrifan. All rights reserved.
AddPersonViewController.swift://  Created by licrifan on 15/12/23.
AddPersonViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
ContactItemTableViewCell.swift://  Created by licrifan on 15/11/28.
ContactItemTableViewCell.swift://  Copyright © 2015年 licrifan. All rights reserved.
ContactTableViewData.swift://  Created by licrifan on 15/11/19.
ContactTableViewData.swift://  Copyright © 2015年 licrifan. All rights reserved.
ContactViewController.swift://  Created by licrifan on 15/10/24.
ContactViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
Conversation.swift://  Created by licrifan on 15/11/14.
Conversation.swift://  Copyright © 2015年 licrifan. All rights reserved.
ConversationManageViewController.swift://  Created by licrifan on 15/12/11.
ConversationManageViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
ConversationTableViewCell.swift://  Created by licrifan on 15/11/11.
ConversationTableViewCell.swift://  Copyright © 2015年 licrifan. All rights reserved.
ConversationViewController.swift://  Created by licrifan on 15/10/24.
ConversationViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
CreateGroupTopicViewController.swift://  Created by licrifan on 15/12/27.
CreateGroupTopicViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
CrifanLib.swift://  Created by licrifan on 15/11/6.
CrifanLib.swift://  Copyright © 2015年 licrifan. All rights reserved.
CrifanLibDemo.swift://  Created by licrifan on 15/11/20.
CrifanLibDemo.swift://  Copyright © 2015年 licrifan. All rights reserved.
FavoriteViewController.swift://  Created by licrifan on 15/11/2.
FavoriteViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
FileManageViewController.swift://  Created by licrifan on 15/12/17.
FileManageViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
FileTableViewCell.swift://  Created by licrifan on 15/12/21.
FileTableViewCell.swift://  Copyright © 2015年 licrifan. All rights reserved.
FileViewController.swift://  Created by licrifan on 15/10/24.
FileViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
GlobalClasses.swift://  Created by licrifan on 15/12/18.
GlobalClasses.swift://  Copyright © 2015年 licrifan. All rights reserved.
GlobalFunctions.swift://  Created by licrifan on 15/11/18.
GlobalFunctions.swift://  Copyright © 2015年 licrifan. All rights reserved.
GlobalFunctions.swift:        "email" : "crifan@jiandao.im",
GlobalFunctions.swift:    "email" : "crifan@daryun.com",
GlobalValues.swift://  Created by licrifan on 15/11/18.
GlobalValues.swift://  Copyright © 2015年 licrifan. All rights reserved.
JianDao/AppDelegate.swift://  Created by licrifan on 15/10/27.
JianDao/AppDelegate.swift://  Copyright © 2015年 licrifan. All rights reserved.
JianDao/Constants.swift://  Created by licrifan on 15/10/24.
JianDao/Constants.swift://  Copyright © 2015年 licrifan. All rights reserved.
JianDao.xcodeproj/project.pbxproj: ORGANIZATIONNAME = licrifan;
Binary file JianDao.xcodeproj/project.xcworkspace/xcuserdata/crifan.xcuserdatad/UserInterfaceState.xcuserstate matches
JianDaoTests/JianDaoTests.swift://  Created by licrifan on 15/10/27.
JianDaoTests/JianDaoTests.swift://  Copyright © 2015年 licrifan. All rights reserved.
JianDaoUITests/JianDaoUITests.swift://  Created by licrifan on 15/10/27.
JianDaoUITests/JianDaoUITests.swift://  Copyright © 2015年 licrifan. All rights reserved.
Login.swift://  Created by licrifan on 15/11/18.
Login.swift://  Copyright © 2015年 licrifan. All rights reserved.
LoginViewController.swift://  Created by licrifan on 15/11/18.
LoginViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
MainViewController.swift://  Created by licrifan on 15/10/24.
MainViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
Message.swift://  Created by licrifan on 15/10/28.
Message.swift://  Copyright © 2015年 licrifan. All rights reserved.
MessageBubbleFactory.swift://  Created by licrifan on 15/10/28.
MessageBubbleFactory.swift://  Copyright © 2015年 licrifan. All rights reserved.
MessageBubbleView.swift://  Created by licrifan on 15/10/28.
MessageBubbleView.swift://  Copyright © 2015年 licrifan. All rights reserved.
MessageTableViewCell.swift://  Created by licrifan on 15/10/28.
MessageTableViewCell.swift://  Copyright © 2015年 licrifan. All rights reserved.
MessageTableViewController.swift://  Created by licrifan on 15/10/27.
MessageTableViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
MyViewController.swift://  Created by licrifan on 15/10/24.
MyViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
PersonInfoViewController.swift://  Created by licrifan on 15/12/19.
PersonInfoViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
RegisterPhoneViewController.swift://  Created by licrifan on 15/12/6.
RegisterPhoneViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
RegisterUsernameViewController.swift://  Created by licrifan on 15/12/6.
RegisterUsernameViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
SelectPersontViewController.swift://  Created by licrifan on 15/12/25.
SelectPersontViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
SelectablePersonItemTableViewCell.swift://  Created by licrifan on 15/12/25.
SelectablePersonItemTableViewCell.swift://  Copyright © 2015年 licrifan. All rights reserved.
SelfInfoViewController.swift://  Created by licrifan on 15/12/15.
SelfInfoViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
SendInvitationViewController.swift://  Created by licrifan on 15/12/23.
SendInvitationViewController.swift://  Copyright © 2015年 licrifan. All rights reserved.
SwitchTeamTableView.swift://  Created by licrifan on 15/11/18.
SwitchTeamTableView.swift://  Copyright © 2015年 licrifan. All rights reserved.
TeamTableViewData.swift://  Created by licrifan on 15/11/19.
TeamTableViewData.swift://  Copyright © 2015年 licrifan. All rights reserved.
licrifandeMacBook-Pro:JianDao crifan$ grep -r "reference" *
JianDao.xcodeproj/project.xcworkspace/xcuserdata/crifan.xcuserdatad/WorkspaceSettings.xcsettings: <string>UseAppPreferences</string>
licrifandeMacBook-Pro:JianDao crifan$

[总结]

想要在当前文件夹,及其下的字文件夹内查找文件内的某个内容时,可以用:

grep -r "stringYouWantToSearch" *

转载请注明:在路上 » [已解决]用grep命令查找当前文件夹及其下子文件内文件中的内容

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
19 queries in 0.224 seconds, using 9.75MB memory