144 Matching Annotations
  1. Last 7 days
  2. Mar 2019
  3. Feb 2019
    1. A kernel driver is necessary to initalize the tablet and translate hardware-specific protocols into standard input events. We contribute patches directly to the Linux kernel, as well as maintain an out-of-tree kernel module that enables old kernels to work with many newer tablets.

      必须安装内核驱动来初始化数位板和转换硬件特殊协议为标准输入事件.我们贡献了补丁直接加入到Linux内核,也维护了一个树型的内核模式让旧内核能够用于新的数位板.

      如果系统对你的数位板无响应或鼠标无响应,尝试安装或更新input-wacom.

  4. Dec 2018
  5. Nov 2018
    1. For compatibility head also supports an obsolete option syntax -[num][bkm][cqv], which is recognized only if it is specified first.
    2. ‘-n [-]num’ ‘--lines=[-]num’ Output the first num lines.
    3. ‘-c [-]num’ ‘--bytes=[-]num’ Print the first num bytes, instead of initial lines.
  6. Oct 2018
    1. the concept of magic numbers goes back to unix and pre-dates the use of file extensions. The original idea of the shell was that all 'executable' would look the same - it didn't matter how the file had been created or what program should be used to evaluate it. The shell would look at the contents of the file and determine the appropriate file. Microsoft came along and chose a different approach and the era of file extensions was born. Then to make things 'nicer' for users microsoft chose to 'hide' these extensions and the era of trojan files which look like they are of one type but really have a different extension and are processed by a different file was born.
    1. Does any one else think that Microsoft is harming the end users windows 10 system stability with a malicious reason behind it? This has been brought up several times in the security forums.

  7. Sep 2018
  8. Aug 2018
    1. RHEL mount hangs: nfs: server [...] not responding, still trying
  9. Jul 2018
  10. Apr 2018
    1. “The number of moving parts is so vast, and several of them are under the control of different groups. There’s no way you could ever pull it together into an integrated system in the same way as you can in a single commercial product with, you know, a single maniac in the middle.”

      While there are indeed many moving parts modern Version Control Systems take care of that properly and automatically. The idea of a Benevolent dictatorship dictating the course of the software is not wrong, but it's been shown that it limits the software itself, no matter how smart or good the dictator is, he/she will never be able to think about every aspect and possible applications of the software. And considering this is a tool for research and experimentation, limiting the tool on purpose is not a very good idea, if you ask me. EVEN THEN, an open-source model leaves space for a Benevolent dictatorship (just as Linux and Google does for many of its FOSS projects), so that isn't really an argument against an open-source non-commercial developing model, in the worst case scenario.

  11. Mar 2018
    1. 1) <hex_major><hex_minor> device number in hexadecimal represents itself * no leading 0x, for example b302. * 2) /dev/nfs represents Root_NFS (0xff) * 3) /dev/<disk_name> represents the device number of disk * 4) /dev/<disk_name><decimal> represents the device number * of partition - device number of disk plus the partition number * 5) /dev/<disk_name>p<decimal> - same as the above, that form is * used when disk name of partitioned disk ends on a digit. * 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the * unique id of a partition if the partition table provides it. * The UUID may be either an EFI/GPT UUID, or refer to an MSDOS * partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero- * filled hex representation of the 32-bit "NT disk signature", and PP * is a zero-filled hex representation of the 1-based partition number. * 7) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation to * a partition with a known unique id. * 8) <major>:<minor> major and minor number of the device separated by * a colon.

      this is all possible valid formats passed to root= option in linux boot command line

  12. Feb 2018
  13. Jan 2018
  14. Dec 2017
    1. You terminate a session by killing its parent process, called the session leader. Find out which process it is with: ps -dN|grep pts/3
    1. 0 6 * * * /root/zwk/test.sh >> /root/zwk/operate_`date +"\%Y\%m\%d"`.log 2>&1

      crontab 执行命令,将对应运行日志按照日期进行存放

  15. Nov 2017
    1. In Bash you quite often need to check to see if a variable has been set or has a value other than an empty string. This can be done using the -n or -z string comparison operators.

      Two most useful commands in bash

    1. find /volume1/Movies /volume1/Music /volume1/Photos "/volume1/Home Videos" "/volume1/Music Videos" -type d -exec chmod 755 {} \;

      recursively changing permissions with find, specifically for directories versus files

    1. /dev/cdrom on /mnt/cdrom type iso9660 (ro,nosuid,nodev)

      VMware Workstation Player 12:

      /dev/sr0 on /media/ubuntu/VMware Tools type iso9660 (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)

  16. Oct 2017
  17. Sep 2017
    1. How can I capture STDERR from an external command?

      problem arises when using backticks to execute external commands

  18. Aug 2017
    1. If zone reclaim is switched on, the kernel still attempts to keep the reclaim pass as lightweight as possible. By default, reclaim will be restricted to unmapped page-cache pages. The frequency of reclaim passes can be further reduced by setting /proc/sys/vm/min_unmapped_ratio to the percentage of memory that must contain unmapped pages for the system to run a reclaim pass. The default is 1 percent.

      This is a percentage of the total pages in each zone. Zone reclaim will only occur if more than this percentage of pages are in a state that zone_reclaim_mode allows to be reclaimed.

      If zone_reclaim_mode has the value 4 OR'd, then the percentage is compared against all file-backed unmapped pages including swapcache pages and tmpfs files. Otherwise, only unmapped pages backed by normal files but not tmpfs files and similar are considered.

      Source

    2. There is a knob in the kernel that determines how the situation is to be treated in /proc/sys/vm/zone_reclaim. A value of 0 means that no local reclaim should take place. A value of 1 tells the kernel that a reclaim pass should be run in order to avoid allocations from the other node. On boot- up a mode is chosen based on the largest NUMA distance in the system.

      This appears to be /proc/sys/vm/zone_reclaim_mode now.

    3. There has been some recent work in making the scheduler NUMA-aware to ensure that the pages of a process can be moved back to the local node, but that work is available only in Linux 3.8 and later, and is not considered mature.

      Stamped2 KNL nodes are already running 3.10, so this is likely available.

    4. The active memory allocation policies for all memory segments of a process (and information that shows how much memory was actually allocated from which node) can be seen by determining the process id and then looking at the contents of /proc/<pid>/numa_maps.
  19. Jul 2017
    1. .

      This character should be escaped by a backslash. The complete command would then be:

      strings $PWD/bin/myapp | egrep '\.gcda$'
      
  20. Jun 2017
    1. 华为的Li Zefan同学

      之前在富士通南大就做Linux Kernel开发,后来到华为

    2. Linux CGroup全称Linux Control Group, 是Linux内核的一个功能,用来限制,控制与分离一个进程组群的资源(如CPU、内存、磁盘输入输出等)。

      关键是cpu

  21. May 2017
    1. tar -zxvf target/secor-0.1-SNAPSHOT-bin.tar.gz -C ${SECOR_INSTALL_DIR}

      linux command to create a new tar ball in a different directory. Might come handy

    1. npm install --save-dev webpack webpack-dev-server react-hot-loader

      You may run into problems if you don't install webpack-dev-server globally. If you must, as you will have to on many Linux systems, the command is as follows:

      sudo npm install --save-dev webpack-dev-server -g
      
  22. Apr 2017
  23. Mar 2017
  24. Feb 2017
    1. Firefox

      really I'm waiting for it on Firefox (you should have anyway started with this one to get the computer/new technology addicts first.(from linux... :-p )) !

    1. A shell script is a file of executable commands that has been stored in a text file. When the file is run, each command is executed.

      The power of BASH!

    1. select proprietary or out-of-tree modules (ex. vitualbox, nvidia, fglrx, bcmwl, etc.)

      If anyone is wondering what other modules they refer to, or how to discover any on your own system, this StackExchange thread on how to identify out-of-tree modules might help.

  25. Jan 2017
  26. Oct 2016
    1. Counting number of lines

      可以用来统计代码行

    2. -print0

      find -print0 经常和 xargs -0 配合使用,处理文件名中换行符这种特殊情况

  27. Jul 2016
  28. Apr 2016
  29. Feb 2016
    1. Nautilus Type-Ahead Find Feature Enabled By Default In Ubuntu 14.04

      How to enable type ahead find ("interactive search") / disable recursive search in Nautilus (this works for me in Nautilus 3.14.2 on Ubuntu Gnome 15.10): just check org.gnome.nautilus.preferences.enable-interactive-search in dconf-editor, or in a terminal just do:

      gsettings set org.gnome.nautilus.preferences enable-interactive-search false
      

      I much prefer the interactive search version, because its a really fast way to navigate with the keyboard by typing the first couple of letters of a file or folder name to jump the selection to that file or folder. For example I open my home folder and type dr and the selection moves to my Dropbox folder then I type Enter to go into the Dropbox folder.

      With recursive search typing dr would replace the display of all top-level files and folders in my home dir with a display of all files and folders matching a recursive search for dr starting from my home dir, which is useful if you're trying to find something and you don't know where it is, but much less useful if you know where you're going and want to navigate quickly with the keyboard.

      With interactive search enabled you can still do a recursive search by typing Ctrl-f first.

  30. Jan 2016
    1. не все нелегалы пираты. помнишь, я выше уже писал про истекшие лицензии?
    2. Сравни с пруф номер 1. M$ фактически создали ситуацию, при которой системы без обновлений ждали, когда их превратят в зомби. В конце 2008-2009 получили конфикер и огроменные ботнеты.
    3. Microsoft много чего финансирует, это же не какое-нибудь нищее FSFну, нищий, это скорее всего ты, а FSF - некоммерческая организация. и тем не менее это не противоречит тому, что я написал выше.