≡ Menu

find command

Unix / Linux: Remove Nonempty Directory Command

I am trying to remove a directory called /opt/source/httpd with the rm command. I am greeted with the following message:

rmdir: failed to remove `/opt/source/httpd’: Directory not empty

How do I delete directory called /opt/source/httpd under Linux or Unix operating systems?
[click to continue…]

Linux / UNIX: mplayer Play mp3s From a Playlist File

I‘m an extreme newbie to the Linux world, but any time I try to get play files according to a playlist file using mplayer command line it turns up this error:

$ mplayer playlist.m3u
MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing playlist.m3u.
Cache fill: 0.00% (44 bytes)

Exiting… (End of file)

How do I fix this and play music without using GUI tools?
[click to continue…]

UNIX / Linux: Deleting Multiple Files In Bulk

How do delete multiple files in bulk (say all *.bak file stored in /netapp/ and its subdirectory) under Linux / UNIX operating systems?
[click to continue…]

Linux / UNIX: Deleting Files In Many Subdirectories

How do I delete all files (only files and not subdirs) located in /var/pub/ftp/incoming and its subdirectories under Linux or UNIX operating systems?
[click to continue…]

HowTo: Find Symlink under UNIX / Linux

How do I find symlink(s) under UNIX and Linux operating systems?
[click to continue…]

Find Command Exclude Directories From Search Pattern

How do I exclude certain directories while using the find command under UNIX or Linux operating systems?
[click to continue…]

I see the following error in my SELinux enabled CentOS or RHEL server:

Jun 21 13:58:43 server3 restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory
Jun 21 16:14:51 server3 restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory
Jun 22 13:32:23 server3 restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory

How do I fix this problem?
[click to continue…]

Linux / UNIX: Bash Find And Delete All Hidden Files Directories

How can I find all all hidden files and directories (starting with . character) under UNIX or Linux and delete them using bash or ksh shell?
[click to continue…]

Linux: Find User Files

How do I find out all files owned by a user called tom or jerry under UNIX / Linux / BSD / OS X operating systems?
[click to continue…]

UNIX / Linux: Find All Empty Files

How do I find out all empty file under Linux and UNIX operating systems?
[click to continue…]