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 :把缓存中的历史命令写入历 ...
随机推荐
- OpenJudge Trans
#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include ...
- 【LeetCode练习题】Swap Nodes in Pairs
Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For exam ...
- poj 3411 Paid Roads(dfs)
Description A network of m roads connects N cities (numbered to N). There may be more than one road ...
- Python常用模块(time, datetime, random, os, sys, hashlib)
time模块 在Python中,通常有这几种方式来表示时间: 时间戳(timestamp) : 通常来说,时间戳表示的是从1970年1月1日00:00:00开始按秒计算的偏移量.我们运 ...
- iterator的简单用法
// 给你写了个简单的例子,不知道合不合你的题意? vector<int>vertical; ; i<; i++) { vertical.push_back(i); } vector ...
- 一些常用运行命令和CMD命令
运行命令 1. 进入服务页面的命令: services.msc 2. 远程连接命令:mstsc.exe 3. 配置电脑启动项 msconfig 4. 计算器 calc.exe 5. 设定关机时间(se ...
- One Way Roads(搜索)
One Way Roads Time Limit:500MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit S ...
- CF 338 D GCD Table(CRT)
转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents by---cxlove 给定一个序列,a[1 ..k],问是否存在(i , ...
- 【初级坑跳跳跳】第一个应用布局学习的代码运行时出错(manifest里未将activity先注册,控件错误)
首先,根据书中想要实现的结果,看了下书中代码,大致知道布局是怎么样的,然后根据图片自己写xml, 1.运行时第一个坑是 忘记在AndroidManifest.xml里先注册activity,导致运行时 ...
- iOS 使用NJKWebViewProgress做webview进度条
NJKWebViewProgress地址:https://github.com/ninjinkun/NJKWebViewProgress 导入头文件 #import "NJKWebViewP ...