Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In AIX I have a long list (more then 30) of hdisks I need to delete them in one shot, what command can I use?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Generic answer for any command on any Unix-like OS:

while read -r item; do
    rmdev "$item"
done < itemlist.txt

Or:

xargs -d'\n' -n1 rmdev < itemlist.txt
share|improve this answer
for hdisk in $(cat hdisk.txt);
do;
   rmdev -Rl $hdisk;
done
share|improve this answer
1  
Could you perhaps expand on the answer to explain how it works? It's not terribly difficult to understand, but not everyone is familiar with the syntax of AIX terminal commands. Explaining how it works will make the answer better for future visitors to the site. –  Jonathan Garber Dec 6 '13 at 19:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.