1

I want to delete one hidden folder from multiple locations at the same time using a single command.

It's located on multiple locations (about 100).

Is there any command which helps to delete this fast?

1 Answer 1

1

you can use find for your purpose. See man find for more.

Say you have a directory 'mydir' in which there are several directory and sub-directory that contain a hidden folder, say '.src'. Also the directory 'mydir' itself has '.src' directory.

mydir
├── a
│   └── .src
├── b
│   ├── j
│   │   └── .src
│   ├── k
│   │   └── .src
│   └── .src
├── c
│   └── .src
├── d
│   └── .src
├── e
│   └── .src
└── .src

To remove all these folders name .src open a terminal and go to 'mydir' and use tha following command,

find . -iname '.src' -type d -exec rm -r {} \;
1
  • Thanks its working...really appreciate your immediate reponse
    – user601482
    Jul 31, 2014 at 7:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .