Skip to content

bash: [: 1+1: integer expression expected

I have a main directory with 40 subdirectories with names [Set 1], [Set 2] … [Set 40], each containing 20 wallpapers with name 1.jpg, 2.jpg, … 20.jpg. I want to move all these wallpapers to the main directory and rename them as 1.jpg, 2.jpg … 800.jpg. I wrote the following Bash script but ge…

Send signal to other process

since os/signal is only for handling of incoming signals I’m asking if there is a native way to send signals to other processes? Edit: The process I want to mange is nginx. My Go application should listen for some events and then send a SIGHUP to nginx to reload its configuration Answer If you have crea…

Regarding gcov output in Linux kernel?

I am running gcov in Linux kernel tree , I am getting correct report but some summary that printed at every file header is coming incorrect like below :- Here we can see number of runs and programs runs are coming zero which is not correct. what could be reason of this bug ? Answer From here: https://www.kern…

Linux command How to delete all with .html extension

i am using putty, want to delete all files which having .html extension I am trying the below ways 1st get the file by using find command Listing all files having .html extension now i am going to delete those files OR both are not working for me, anybody know solution Thanks Answer make sure you’re del…

Where is file_lock stored in Linux

I’m reading the Understand the Linux Kernel book, and it says that the list of file_lock is stored in the file’s inode (of field i_flock). But in the sys_flock() of Linux 2.6.11.12, which will eventually call flock_lock_file(). It uses filp->f_dentry->d_inode->i_flock to get the list of f…