LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-28-2003, 02:02 PM   #1
csosa
Member
 
Registered: Apr 2003
Posts: 35

Rep: Reputation: 15
del file


how do I delete a file in the terminal? what's the command?
 
Old 09-28-2003, 02:04 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
rm
 
Old 09-28-2003, 02:04 PM   #3
christer
Member
 
Registered: Sep 2003
Location: Utah
Distribution: Red Hat 9
Posts: 131

Rep: Reputation: 15
rm would be to 'remove' a file. That's what I use.
 
Old 09-28-2003, 02:06 PM   #4
csosa
Member
 
Registered: Apr 2003
Posts: 35

Original Poster
Rep: Reputation: 15
I'm trying to delete a directory.. if I use rm I get the following error: cannot remove directory `plugins': Is a directory... is there another command I can use?
 
Old 09-28-2003, 02:08 PM   #5
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
to delete a directory use:

rm -r directory_name

that will prompt you with an "are you sure" type of message.

use:

rm -rf directory_name

if you don't want to be prompted and want to force a deletion.
 
Old 09-28-2003, 02:10 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You should have told us its a directory.

If its empty with no files within the directory, use the rmdir command.

If you have files in the directory and want to remove all of them and the directory, use: rm -rf

But be careful when using rm-rf as if you make a mistake, you can delete your whole system as this forces the removal with no questions asked. For example:

rm -rf / home/user/somedir

Notice the space after the first / and home, that would remove your whole filesystem since it would think your deleting / instead of /home/user/somedir
 
Old 09-28-2003, 02:12 PM   #7
csosa
Member
 
Registered: Apr 2003
Posts: 35

Original Poster
Rep: Reputation: 15
ok thnks that worked.. now how do I create a directory?
 
Old 09-28-2003, 02:14 PM   #8
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
mkdir directory_name

mkdir /home/user/music

will create a directory named music in /home/user/
 
Old 09-28-2003, 02:18 PM   #9
csosa
Member
 
Registered: Apr 2003
Posts: 35

Original Poster
Rep: Reputation: 15
where can I find a list of commands for the terminal? I want to learn how to do several thing..
 
Old 09-28-2003, 02:20 PM   #10
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
sticky thread in linux general:

http://www.linuxquestions.org/questi...threadid=15837
 
Old 09-28-2003, 02:24 PM   #11
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
Tips for beginners:
1) get a cheapo linux book on sale somewhere in the "get rid of section" of the bookstore.
2) learn the easy stuff like mkdir, rmdir, adduser etc from that - ie read the book and use it for references.
3) man pages are at your fingertips - try these:
man mkdir
man adduser

It's is always worth having a good Linux book too for references - you WILL use it and it can save you alot of time searching the net for silly stuff.

Between me and my roomate we have about 15 bloody Linux/Unix books - tonnes of resources - REALLY helpful.

mossy

Last edited by mossy; 09-28-2003 at 02:25 PM.
 
Old 09-28-2003, 02:27 PM   #12
christer
Member
 
Registered: Sep 2003
Location: Utah
Distribution: Red Hat 9
Posts: 131

Rep: Reputation: 15
Yeah, I've got an old 486 with some old perhistoric distro on it that I would practice with and I actually had setup as a router/firewall for my local LAN. If it's an old POS machine you can mess w/ it w/o worrying about things.

...I did however fry a video card once in Linux. I was playing with the video settings & must have set the sucker too high. Oops.
 
Old 09-28-2003, 02:30 PM   #13
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
heh heh heh
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
accidentally del /etc/group file in RedHat 9 karmakid Linux - Security 3 08-02-2005 08:16 PM
Quota Problem,qbout Upload/del File, i need help,thank singying304 Linux - Software 14 07-06-2005 11:27 AM
How to del all the files expanded by an tarball file? hkl8324 Debian 18 06-14-2005 05:36 AM
Do I can del them? explorer1979 Linux - General 1 02-20-2003 02:21 AM
DEL Button does nothing.... Chijtska Linux - General 3 02-16-2002 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration