본문 바로가기

Computer

Undo git push Sometime, I would like to remove what I push into the git branch, in that case, the following two steps can give me a way to do so.. 1) check the hash if you want to revert.... 2) git push -f origin hash_id_if_you_want_to_rever:branch_name 더보기
Combine multiple PDF files to a pdf file In the case, one want to create one pdf file from N pdf files, gs will save us to do this quickly. For example, one has the following pdf files : 1.pdf2.pdf....10.pdf And would like to have result.pdf from these pdf files, the following command will create the result.pdf file gs -q -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=result.pdf -dBATCH file{1..10}.pdf 더보기
how to acceess udev rule parameter Sometime, one needs to access all attribute on a device in order to create the udev rule for this device. $ udevadm info --query=all -n /dev/EtherCAT0 --attribute-walk Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed b.. 더보기
How to get only the mac address (Linux) Sometime, I would like to get only the mac address of the ethernet device. so here is the command line to do this. ip addr show dev enp5s0 | grep "link/ether" | awk '{print $2}' 더보기
Exact copy a huge directory into the different one in linux I have ifc1410-ioxos-161103 in /export/nfsroots/, and would like to copy the entire dir in the different name. $ mkdir ifc1410-ioxos-161103-rules-test $ cd ifc1410-ioxos-161103 $ sudo -E tar cf - . | (cd /export/nfsroots/ifc1410-ioxos-161103-rules-test/ && tar xBf -) Reference http://www.linuxdevcenter.com/pub/a/linux/lpt/18_16.html 더보기
Raspberry Pi Image copy in Linux As described in https://www.raspberrypi.org/documentation/installation/installing-images/linux.md, dd can be used for "image copying on a MicroSD". However, in the case where dd version is old, it would be good to use "pv" to check its status as follows: pv -tpre 2017-03-02-raspbian-jessie.img | dd bs=4M of=/dev/sdb 더보기
Bootable Linux USB from iso pv -tpre CentOS-7-x86_64-DVD-1611.iso | dd of=/dev/sdg conv=notrunc,noerror If pv doesn't exist in a system, please install it via a package manager 더보기
[git] when the location of a submodule is changed modify .gitmodule to change the new url in .gitmodules [submodule "epics-modules/mrfioc2"] url = https://github.com/epics-modules/mrfioc2run git submodule sync 더보기