代码改变世界

Linux Shell tr 命令详解

2021-03-14 16:05 by jetwill, 498 阅读, 0 推荐, 收藏, 编辑
摘要:该随笔摘自 https://www.jb51.net/article/103892.htm Linux shell tr 命令详解 用途 tr,translate的简写,主要用于压缩重复字符,删除文件中的控制字符以及进行字符转换操作。 语法 tr [OPTION]... SET1 [SET2] -s 阅读全文

Shell统计每个单词出现的个数

2021-03-14 15:44 by jetwill, 2161 阅读, 1 推荐, 收藏, 编辑
摘要:题目链接 题目描述 写一个 bash脚本以统计一个文本文件 nowcoder.txt 中每个单词出现的个数。 为了简单起见,你可以假设: nowcoder.txt只包括小写字母和空格。 每个单词只由小写字母组成。 单词间由一个或多个空格字符分隔。 示例: 假设 nowcoder.txt 内容如下: 阅读全文

Limiting Command Size

2021-01-19 10:11 by jetwill, 57 阅读, 0 推荐, 收藏, 编辑
摘要:Next: Controlling Parallelism, Previous: Unusual Characters in File Names, Up: Multiple Files [Contents][Index] 3.3.2.4 Limiting Command Size xargs gi 阅读全文

Linux shc 命令手册

2021-01-06 21:45 by jetwill, 1019 阅读, 0 推荐, 收藏, 编辑
摘要:shc Generic shell script compiler. https://www.linux-man.cn/command/shc/ #Compile a shell script: shc -f {{script}} #Compile a shell script and specif 阅读全文

find文件后cp、rm

2021-01-05 17:01 by jetwill, 173 阅读, 0 推荐, 收藏, 编辑
摘要:复制: find <src-path> -name 'some names' -exec cp {} <dest-path> \; find <src-path> -name 'some names' | xargs -i cp {} <dest-path> find <src-path> -nam 阅读全文

Django终端打印SQL语句

2020-12-29 23:30 by jetwill, 115 阅读, 0 推荐, 收藏, 编辑
摘要:在Django项目的settings.py文件中,在最后复制粘贴如下代码: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'console':{ 'level':'DEBUG', 'class': 阅读全文

Oracle查看表空间及大小

2020-12-25 16:43 by jetwill, 3140 阅读, 1 推荐, 收藏, 编辑
摘要:--1、查看表空间的名称及大小 SELECT t.tablespace_name, round(SUM(bytes / (1024 * 1024)), 0) ts_size FROM dba_tablespaces t, dba_data_files d WHERE t.tablespace_nam 阅读全文

Oracle 五种约束的创建和移除:

2020-12-25 16:42 by jetwill, 348 阅读, 0 推荐, 收藏, 编辑
摘要:1.主键约束: 创建表的时候就添加: create table table_name (categoryId varchar2(10), categoryName varchar2(30), primary key(categoryId)); 创建表后追加: alter table table_na 阅读全文

Oracle的decimal和number的对比

2020-12-25 16:31 by jetwill, 1608 阅读, 1 推荐, 收藏, 编辑
摘要:Oracle只是在语法上支持decimal类型,但是在底层实际上它就是number类型,支持decimal类型是为了能把数据从Oracle数据库移到其他数据库中(如DB2等)。 因为decimal在Oracle底层就是number类型,所以就当number类型使用就可以了,如果需要对这种字段类型转为 阅读全文

把表和索引移动到不同的表空间

2020-12-25 16:30 by jetwill, 136 阅读, 0 推荐, 收藏, 编辑
摘要:Move tables & indexes to different tablespace # https://deveshdba.wordpress.com/2016/08/11/move-tables-indexes-to-different-tablespace/ ALTER TABLE <T 阅读全文
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页