Unix & Linux
Automatically rename files when they are placed in a specific directory
Is it possible to automatically rename a file when it’s placed in a specific directory?
How does the linux kernel know device major and minor numbers?
As far as I know, the kernel detects hardware, adds information to sysfs creates a device in /dev and then generates a udev event. My question is, do device drivers do all of this or it is the kernel itself? If drivers do it, then they would know the device major and minor number to create the file in devtmps.
Delete an array in awk
In awk, I can clear an array with a loop, making it an empty array, which is equivalent to deleting it.
New RAID array will not auto assemble, leads to boot problems
I had just asked this question where I was unable to boot after installing a new RAID1 Array. I was able to get to the terminal, but once I sorted that out I realized that my problem isn’t so much an fstab boot problem as an mdadm auto assemble problem.
How to find the hashing algorithm used to hash passwords?
I have the working password and can see the hash (/etc/passwd). How do I find the hashing algorithm used to hash the password, without manually trying different algorithms until I find a match?
Replacing string based on line number
I have a situation where i want to replace a particular string in many files
Speed up copying 1000000 small files
I have 1000000 4-20 kb files in a dir (You can generate similar files like this: seq 10000 | gzip > a; seq 1000000 | parallel --bar 'head -c{=$_=int(rand()*16)+4=}k a > {}')
Cron entry for last Saturday of every month
I want to schedule my script for last Saturday of every month.
I have come up with the below:
How do I completely silence a cronjob to /dev/null/?
On my Ubuntu-Desktop and on my debian-server I have a script which needs to be executed each minute (a script that calls the minute-tic of my space online browsergame).