linux中的strings命令简介2
摘自:http://blog.csdn.net/stpeace/article/details/46641069
linux中的strings命令简介
之前我们聊过linux strings的用法和用途, 但据我了解, 还有部分朋友并不常用strings, 这是个不好的习惯。 所以, 本文继续啰嗦一下strings命令.
在软件开发中, 我们经常需要修改代码, 并生成静态库、动态库或者可执行文件, 有时候, 工程太大, 那怎样确定自己改动的代码正确编译到库中去了呢? 用strings命令吧! 为了简便起见, 我们仅仅以可执行文件为例:
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "hello world" << endl;
- return 0;
- }
- [taoge@localhost test]$ g++ test.cpp
- [taoge@localhost test]$ strings a.out | grep main
- __libc_start_main
- [taoge@localhost test]$ strings a.out | grep hello
- hello world
- [taoge@localhost test]$
可见,test.cpp文件是编译进了a.out文件的。 在实际开发中, 我们经常需要用strings命令进行确认和验证, 确保万无一失。 有些时候, 你的修改并没有错, 但实际并没有编译到库中, 因此不能生效, 纳闷良久, 误导人很长时间的。
我每天几乎都要用strings命令, 所以慢慢就爱上了strings.
为了便于了解更多关于strings的内容, 我附上之前文章的地址:http://blog.csdn.net/stpeace/article/details/46641069
linux中的strings命令简介2的更多相关文章
- linux中的strings命令简介
摘自:http://blog.csdn.net/stpeace/article/details/46641069 linux中的strings命令简介 在linux下搞软件开发的朋友, 几乎没有不知道 ...
- linux中的ldd命令简介
转载自:http://blog.csdn.net/stpeace/article/details/47069215 在linux中, 有些命令是大家通用的, 比如ls, rm, mv, cp等等, 这 ...
- linux中的nm命令简介
转:http://blog.csdn.net/stpeace/article/details/47089585 一般来说, 搞linux开发的人, 才会用到nm命令, 非开发的人, 应该用不到. 虽然 ...
- linux中的strings命令
strings - print the strings of printable characters in files. 意思是, 打印文件中可打印的字符. 我来补充一下吧 ...
- linux中的strip命令简介------给文件脱衣服
1.去掉-g,等于程序做了--strip-debug2.strip程序,等于程序做了--strip-debug和--strip-symbol 作为一名Linux开发人员, 如果没有听说过strip命令 ...
- linux中的strip命令简介------给文件脱衣服【转】
转自:http://blog.csdn.net/stpeace/article/details/47090255 版权声明:本文为博主原创文章,转载时请务必注明本文地址, 禁止用于任何商业用途, 否则 ...
- linux中的strip命令简介
转载:https://blog.csdn.net/qq_37858386/article/details/78559490 strip:去除,剥去 一.下面是man strip获得到的信息,简 ...
- Python学习之旅:使用Python实现Linux中的ls命令
一.写在前面 前几天在微信上看到这样一篇文章,链接为:https://mp.weixin.qq.com/s/rl6Sgv3uk_IpoFAx6cWa8w,在这篇文章中,有这样一段话,吸引了我的注意: ...
- Linux中的历史命令
Linux中的历史命令一般保存在用户 /root/.bash_history history 选项 历史命令保存文件夹 选项 -c:清空历史命令 -w :把缓存中的历史命令写入历 ...
随机推荐
- 【转】Compile、Make和Build的区别
原文网址:http://lavasoft.blog.51cto.com/62575/436216 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任 ...
- 2014第2周四部署环境&买火车票
2014第2周四部署环境&买火车票 今天遇到mysql一个问题:要把两个包含不同数据库的绿色mysql安装包中的数据库文件合并到一个数据库中,之前在sqlserver下操作很简单,只需要分离. ...
- js跳转页面代码用法
一:window.location.href='https://www.baidu.com'; 需要加上http或者https,否则会查找项目内htm打开. 二:window.history.bac ...
- Java 线程第三版 第八章 Thread与Collection Class 读书笔记
JDK1.2引入最有争议性的改变是将集合类默觉得不是Thread安全性的. 一.Collection Class的概述 1. 具有Threadsafe 的Collection Class: j ...
- FlashBack-SCN-TIMESTAMP
一.基于时间(as of timestamp)的flashback1.创建表create table flash_tab(id,vl) as select rownum,oname from ( se ...
- C++实现20个设计模式
http://c.chinaitlab.com/special/sjms/Index.html 一个月下来,把常见的20个设计模式好好复习并且逐个用C++实现了一遍,收获还是很大的,很多东西看上去明白 ...
- 关于继承扩展ASP.NET控件(以Textbox为例)
以下是一个相对简陋的扩展, 主要是针对金额显示的Textbox扩展. using System; using System.Collections.Generic; using System.Linq ...
- Android的Activity屏幕切换滑动动画
Activity的切换效果使用的是Android的动画效果,Android的动画在官方有相关资料:http://developer.android.com/guide/topics/graphics/ ...
- OC准备知识
#import 与 #include区别 include完成头文件的导入,可能会导致头文件的相互引用和函数或变量的重复定义 为了解决这个问题 我们必须这样做 #ifndef Student_h #de ...
- [Effective Modern C++] Item 5. Prefer auto to explicit type declarations - 相对显式类型声明,更倾向使用auto
条款5 相对显式类型声明,更倾向使用auto 基础知识 auto能大大方便变量的定义,可以表示仅由编译器知道的类型. template<typename It> void dwim(It ...