首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    package-cleanup

    为什么这么说呢? 卸载deb包时候,可以连不要的依赖关系包一起删除,但是多如牛毛的rpm却不可以。 这个真的是rpm的痛! yum仅仅能在线安装rpm,但是只能在安装的时候解决依赖关系,卸载的时候却不行。 不过,有个工具可以专门解决rpm依赖关系:package-cleanup Options:   -h, --help           show this help message and exit   --problems           List dependency problems in the local RPM database   --leaves             List leaf nodes in the local RPM database   --all                When listing leaf nodes also list leaf nodes that are                        not libraries   --orphans            List installed packages which are not available from                        currenly configured repositories.   -q, --quiet          Print out nothing unecessary   -y                   Agree to anything asked   -d, --dupes          Scan for duplicates in your rpmdb   --cleandupes         Scan for duplicates in your rpmdb and cleans out the                        older versions   --oldkernels         Remove old kernel and kernel-devel packages   --count=KERNELCOUNT  Number of kernel packages to keep on the system                        (default 2)   --keepdevel          Do not remove kernel-devel packages when removing                        kernels   -c CONFFILE          config file location Please specify either --problems, --leaves, --orphans or --oldkernels 例如,你不小心安装了gnome-games,然后马上把这个卸载。你会发现只卸载了gnome-games,那些“包庇”gnome-games的“同党”还留在你的硬盘里! 这时,你输入:package-cleanup --leaves 就会列出一系列的关系包,都是在rpm数据库里没有被依赖的依赖包。 把这些包统统remove,你的硬盘从此干净了。

    01

    算法与数据结构之十----内核中的链表操作学习

    /**************************************************************** 文件内容:内核之链队操作 版本V1.0 作者:HFL 时间:2013-12-22 说明:用户态中链表每个节点包含数据域和指针域,而内核态是每个数据中包含链表 因此内核态链表一般是嵌套在某个包含数据成员的结构体来实现。 内核的链表应用非常广泛:进程管理,定时器,工作队列,运行队列。总之 内核对于多个数据的组织和多个熟悉的描述都是通过链表串起来的。  *****************************************************************/  #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/list.h> MODULE_DESCRIPTION("My Module"); MODULE_ALIAS("My module"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("HFL21014"); struct student {     char name[100];     int counter;     struct list_head list; }; struct student *Mystudent; struct student *Temp_student; struct list_head student_list; struct list_head *pos; int Kernel_list_init() { int j = 0; INIT_LIST_HEAD(&student_list); Mystudent = kmalloc(sizeof(struct student)*5,GFP_KERNEL); memset(Mystudent,0,sizeof(struct student)*5); for(j=0;j<5;j++) {        sprintf(Mystudent[i].name,"Student%d",j+1);       Mystudent[j].counter = j+1;      list_add( &(Mystudent[j].list), &student_list); }  list_for_each(pos,&student_list) //遍历整个内核链表,pos其实就是一个for循环标量。中间临时使用,既不输入也不输出 { Temp_student = list_entry(pos,struct student,list);  printk("hello,my student %d  name: %s\n",Temp_student->counter,Temp_student->name); } return 0; } void Kernel_list_exit() { int k ; /* 模块卸载是要删除链表,并释放内存 */ for(k=0;k<10;jk++) { list_del(&(Mystudent[k].list));      } kfree(Mystudent); } module_init(Kernel_list_init);

    03
    领券