Solved

can't i delte folder at one stretch through ssh?

Posted on 2006-07-02
9
1,004 Views
Last Modified: 2012-06-21
when i delting folder then i am getting below meesage;after deleting sub folders i am able to delete main folder;i am doing through SSH.

"please make sure that the folder is empty before deleting it"

can't i delte folder at one stretch?
0
Comment
Question by:chaitu chaitu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 7

Assisted Solution

by:Jon_Ferguson
Jon_Ferguson earned 200 total points
ID: 17029055
rm -rdf /path/to/folder

man rm
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17029069
what is "man rm"???
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17029336
man rm

gives you the manual entry for the rm (remove command)

man man

gives you the manual entry for the man command. A manual entry exists for most linux command and is a valuable reference on any linux system.

(   (()
(`-' _\
 ''  ''
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 22

Accepted Solution

by:
pjedmond earned 300 total points
ID: 17029354
...or

rm -Rf /path/to/folder

recursively deletes any content within a folder and then deletes it.

(   (()
(`-' _\
 ''  ''
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17029638
this command is enough

rm -rdf /root/org/apache/jsp
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17029652
or

rm -Rf /root/org/apache/jsp

if you want to use 1 less letter:)

(   (()
(`-' _\
 ''  ''
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 17029667
in this directory /root/org/apache/jsp if i want to delete only class files then

rm -Rf /root/org/apache/jsp *.class

0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17029697
rm  /root/org/apache/jsp/*.class

will delete only .class files and it will prompt you for each file to delete (Y/N)

to delete all of the *.class files without prompting:

rm -Rf /root/org/apache/jsp/*.class

(   (()
(`-' _\
 ''  ''

0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17029705
Ooops - recursive not required for this one, so to delete all of the *.class files without prompting:

rm -f /root/org/apache/jsp/*.class

is sufficient:)

(   (()
(`-' _\
 ''  ''

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question