小编yuw*_*ang的帖子

Django中的syncdb时陈旧的内容类型

当我正在尝试syncdb我的django项目时,我看到以下抱怨:

The following content types are stale and need to be deleted:

myapp | 

Any objects related to these content types by a foreign key will also
be deleted. Are you sure you want to delete these content types?
If you're unsure, answer 'no'.
Run Code Online (Sandbox Code Playgroud)

虽然我也读过类似的问题django-syncdb-many-to-many-stale,但是yes因为我在prod实例上,所以我不能冒险打字.

可以yes 安全地删除contenttype中的那些陈旧条目吗?

python django syncdb contenttypes

13
推荐指数
1
解决办法
7598
查看次数

在bash中提取一个特定的单词

我在下面的表格中有一些行:

-rw-r--r-- sten/sefan anonymous 8593 2011-12-05 18:28 8M
-rw-r--r-- sten/sefan 8593 2011-12-05 18:28 8M
Run Code Online (Sandbox Code Playgroud)

我如何获得8593单行班轮?

通过执行一些dry-run归档来检索这些行,例如:

$ tar jtvf zip64support.tar.bz2 
-rw-r--r-- stefan.bodewig/Domain Users 16195018 2011-10-14 21:05 100k_Files.zip
-rw-r--r-- stefan.bodewig/Domain Users 14417258 2011-10-14 21:05 100k_Files_7ZIP.zip
Run Code Online (Sandbox Code Playgroud)

要么:

$ tar jtvf bla.tar.bz2 
-rw-r--r-- tcurdt/tcurdt   610 2007-11-14 18:19 test1.xml
-rw-r--r-- tcurdt/tcurdt    82 2007-11-14 18:19 test2.xml
Run Code Online (Sandbox Code Playgroud)

特别是YYYY-mm-dd在它之后获得一行中的数字.

linux bash awk cut sed

2
推荐指数
1
解决办法
132
查看次数

如何在不提取的情况下检查存档文件的实际大小?

我有一个存档 foo.tar.gz(实际大小为 8M),其中包含一个大型稀疏文件(大约 10G)。

我的问题是,如何在不提取存档的情况下知道实际的稀疏文件大小?

linux compression extract archive sparse-matrix

1
推荐指数
1
解决办法
3452
查看次数

标签 统计

linux ×2

archive ×1

awk ×1

bash ×1

compression ×1

contenttypes ×1

cut ×1

django ×1

extract ×1

python ×1

sed ×1

sparse-matrix ×1

syncdb ×1