Skip to content

Tag: linux

PCSC Lite smartcard names

In windows we have function SCardListCards but I’m programming under Linux with pcsclite, how is possible to list cards here? Card names, attributes ? Answer This is just request to internal windows Database with known smartcards ATR and ATRMask. You can look at this database: HKLMSOFTWAREMICROSOFTCrypt…

lookup the lock statistic in linux kernel

I study Linux lock mechanism recently, and want to see the lock holding and waiting time. So I turn on CONFIG_LOCK_STAT flag in the .config file via make menuconfig and after recompiling the kernel run the command: I got the following message: Just don’t know why, since I’ve turn on all the flags …

Library with fftwf_plan_dft_r2c_1d?

I have an error when loading a third party .so file: I have libfftw3.so installed (Ubuntu fftw3 package), but it does not define fftwf_plan_dft_r2c_1d symbol. Instead of this it has: (prefix fftw_ instead of fftwf_), according to doc it should be fftw_ http://www.fftw.org/doc/Real_002ddata-DFTs.html, but wher…

flock: -c requires exactly one command argument

We have multiple cronjobs running on our system. The problem is that we run them every hour, and therefore sometimes the cronjob didn’t finish and a new instance has started. Because of that, we wanted to use flock so the script only gets executed once. However, when I have this in my crontab or run it …

can i get df-h with full percent on disk volume? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …

php password check with hash doesn’t work

I write a login page and a checking page in php. On my local machine it work, but on the server it doesn’t (if it matter I’m on Windows and the server is on Linux). Here is the code in the checking page: The strange thing is that when I enter something with letters to the password input the system

Comparing tow large files line by line

I was wondering if there is any efficient way to compare 2 large files line by line. File 1 File 2 I am just taking the first character of each file and comparing against them. Currently i am using a very naive method of iterating through them in a double for loop. Like Reading both files into memory is not