≡ Menu

xargs command

Linux / Unix: Find All Hidden Dot Directories and Delete

I need to clean up my backups stored on the nas server. I need to free up the disk space. How do I find out all hidden dot directories such as /nas01/backups/home/user/.gnome/, /nas01/backups/home/user/.gnome/ and so on and delete then in a single pass using Linux or Unix command line option? Please note that I do not want to delete nested hidden directories such as /nas01/backups/home/user/data/.xml, /nas01/backups/home/user/foo/bar/.level/.levle2/ and so on.
[click to continue…]

Linux / Unix: Find and Delete All Empty Directories & Files

How do I find out all empty files and directories on a Linux / Apple OS X / BSD / Unix-like operating systems and delete them in a single pass?
[click to continue…]

UNIX / Linux: Explains setuid File Permission

What does it mean for a file to be "setuid?" How do keep track of all setuid enabled file?
[click to continue…]

Linux / UNIX Find All World-Writable Directories Have Sticky Bits Set

How do I find out all world writable directories have sticky bits set under CentOS Linux server?
[click to continue…]

xargs: How To Control and Use Command Line Arguments

I am trying to use xargs command using shell pipes and not able to understand how to control and use command line arguments. For example I'd like to find out all *.c file located in 100s of sub-directories and move them to another directory called ~/old.src. How do I use command line args with xargs to achieve the same?
[click to continue…]

How To Find and Overcome Shell Command Line Length Limitations

While using mv or rm command I get command line length error (Argument list too long error). How do I find out current running shell command line length limitations? How do I overcomes these limitations while writing UNIX / BSD / Linux shell utilities?
[click to continue…]

Linux / UNIX Recursively Search All Files For A String

How do I recursively search all text files for a string such as foo under UNIX / Linux / *BSD / Mac OS X shell prompt?
[click to continue…]

How to Delete Exim Email For A Particular User From Mail Server Queue

Q. I’m using Fedora 7 server with exim pre installed by someone else. How do I delete email for a particular user from exim queue (like user@dom.com)?
[click to continue…]

Linux/UNIX: Argument list too long error for rm, cp, mv commands in a shell error

I'm a new Linux user. We have a backup server and most our developers sftp or ftp to upload files. I just need to backup of last four weeks. If I try to list or remove directories I get an error cannot remove directory. I'm getting "Argument list too long" message. How do I solve this problem when executing commands in the bash/ksh/csh/tcsh/zsh shell?
[click to continue…]

Bash Find All File Names With White Spaces

How do I find all files with one ore more blank space (while spaces) in their name under UNIX like operating systems?
[click to continue…]