The Problem While trying to list or interact with large number of files from command line it results with following error: $ ls -l *.xml | wc -l bash: /bin/ls: Argument list too long 0 $ rm *.xml bash: /bin/rm: Argument list too long or when trying to delete large number of files using find […]
Archives for June 2018
How to disable write access to USB devices using “hdparm” tool
The hdparm Command hdparm provides a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS ‘libata’ subsystem and the older IDE driver subsystem. It should also work with most USB drives as well since they appear as SATA devices to the kernel. The hdparm command is standard on most Linux distributions. You […]
How To Force User/Group Ownership Of Files On A Samba Share
The Ask You have a disk directory shared among Linux and Microsoft Windows clients. Multiple users need access to this directory share, but when files are created or modified from the Linux clients the Linux file permissions are applied making it difficult or impossible for the Windows clients to access these files. You would like […]
Linux Interview Questions – Basic File and Directory Permissions
What are Basic Linux File permissions? Linux, like UNIX, is a multi-user system, and file permissions are one way the system protects against malicious tampering. One way to gain entry when you are denied permission is to su to root. Keep in mind, whoever knows the root password has complete access. But switching to the […]
What are Shell Scripts? How to Create Shell Scripts?
What Is a Shell? A shell is a program that provides an interface between a user and an operating system (OS) kernel. An OS starts a shell for each user when the user logs in or opens a terminal or console window. What Is a Shell Script? A shell script is a file that contains […]