LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-04-2011, 02:51 PM   #1
hopkinskong
LQ Newbie
 
Registered: Aug 2011
Distribution: Ubuntu, Slackware Current
Posts: 10

Rep: Reputation: Disabled
Can't delete file(s) in Slackware?


Hello,

I can't delete files in my Slackware, i tried three times, i select the files, then SHIFT+DELETE, and the notification told me the file deleted, but when i go to the root of my filesystem, it still:

0 B free of 2.5GiB (100% used)

I have checked the trash folder, ~/.local/share/Trash/files, /.Trash-0, /.local/share/Trash/files, all are empty

Any solution?

Thanks
 
Old 08-04-2011, 02:57 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Welcome to LQ!!!

Did you try deleting the files from command line?

Code:
rm -r -f filename
or if you want to delete files of particular type say pdf files then use the following command:

Code:
rm -r -f *.pdf
I am quite curious to know what type of files they are and what is their size?

Run
Code:
ls -l
on the directory where they reside[/code]
 
Old 08-04-2011, 02:59 PM   #3
hopkinskong
LQ Newbie
 
Registered: Aug 2011
Distribution: Ubuntu, Slackware Current
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Hi there,

Welcome to LQ!!!

Did you try deleting the files from command line?

Code:
rm -r -f filename
or if you want to delete files of particular type say pdf files then use the following command:

Code:
rm -r -f *.pdf
I am quite curious to know what type of files they are and what is their size?

Run
Code:
ls -l
on the directory where they reside[/code]
No i haven't tried that yet, but i want to free up my space first lol

I cleared all the files in /boot, and all files in /tmp

I have turned off that machine now, ls -l should output total:x files, right? if yes, it returned total: 0 files

Last edited by hopkinskong; 08-04-2011 at 03:04 PM.
 
Old 08-04-2011, 03:07 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

What you deleted all files under /boot

How did you manage to boot then ;-)

If you run ls -l it will return total: 0 if there are not files in there.

And yes by suggesting to you to run rm command I was trying to help you in clearing up the space.

Last edited by T3RM1NVT0R; 08-04-2011 at 03:08 PM.
 
Old 08-04-2011, 03:13 PM   #5
hopkinskong
LQ Newbie
 
Registered: Aug 2011
Distribution: Ubuntu, Slackware Current
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
What you deleted all files under /boot

How did you manage to boot then ;-)

If you run ls -l it will return total: 0 if there are not files in there.

And yes by suggesting to you to run rm command I was trying to help you in clearing up the space.
I am booting from some kind of "external bootloader with custom kernel"...
I'll try removing files from console tomorrow...

btw, where the "deleted" files go? Why my space still can't free up by using "SHIFT+DELETE"?
 
Old 08-04-2011, 06:02 PM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I don't know about whare your trashed files go, but when you delete from the command line using "rm", they're gone for good (they are actually deleted, not moved to a trash directory).
 
Old 08-04-2011, 11:48 PM   #7
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
With all due respect, do you know exactly what you are doing? I'd be extremely wary about just clearing files out, especially those from folders like /boot.
 
Old 08-05-2011, 03:07 AM   #8
hopkinskong
LQ Newbie
 
Registered: Aug 2011
Distribution: Ubuntu, Slackware Current
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by devnull10 View Post
With all due respect, do you know exactly what you are doing? I'd be extremely wary about just clearing files out, especially those from folders like /boot.
Yes, i know what i am doing,i am using custom kernel, so the /boot files are useless, btw, i will try to remove kernel modules using rm -R later

EDIT: rm command works, it free up my disk space, but where is my previously "deleted" file? how to actually delete them?


Thanks.

Last edited by hopkinskong; 08-05-2011 at 03:16 AM.
 
Old 08-05-2011, 08:12 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Welcome to LQ!

As other LQ members have stated: once you use the 'rm' command then the files are unlinked/removed. You can sometimes recover files with other utilities but be forewarned that you cannot always recover without due effort.

(Linux is Not Windows) Refers to the GNU/Linux OS and various Free & Open-Source Software (FOSS) projects under the catch-all name of "Linux".

If you wish to learn what a command does then use 'man command' from the 'cli'. So 'man rm' will explain;
Quote:
rm - remove files or directories

SYNOPSIS
rm [OPTION]... FILE...

DESCRIPTION
This manual page documents the GNU version of rm. rm removes each specified file.
By default, it does not remove directories.

If the -I or --interactive=once option is given, and there are more than three
files or the -r, -R, or --recursive are given, then rm prompts the user for whether
to proceed with the entire operation. If the response is not affirmative, the
entire command is aborted.

Otherwise, if a file is unwritable, standard input is a terminal, and the -f or
--force option is not given, or the -i or --interactive=always option is given, rm
prompts the user for whether to remove the file. If the response is not affirma-
tive, the file is skipped.

OPTIONS
Remove (unlink) the FILE(s).

-f, --force
ignore nonexistent files, never prompt

-i prompt before every removal

-I prompt once before removing more than three files, or when removing recur-
sively. Less intrusive than -i, while still giving protection against most
mistakes

--interactive[=WHEN]
prompt according to WHEN: never, once (-I), or always (-i). Without WHEN,
prompt always

--one-file-system
when removing a hierarchy recursively, skip any directory that is on a file
system different from that of the corresponding command line argument

--no-preserve-root
do not treat `/' specially
--preserve-root
do not remove `/' (default)

-r, -R, --recursive
remove directories and their contents recursively

-v, --verbose
explain what is being done

--help display this help and exit

--version
output version information and exit

By default, rm does not remove directories. Use the --recursive (-r or -R) option
to remove each listed directory, too, along with all of its contents.
....
Just a few links to aid you to gaining some understanding;



1 Linux Documentation Project
2 Rute Tutorial & Exposition
3 Linux Command Guide
4 Bash Beginners Guide
5 Bash Reference Manual
6 Advanced Bash-Scripting Guide
7 Linux Newbie Admin Guide
8 LinuxSelfHelp
9 Utimate Linux Newbie Guide
10 Linux Home Networking
11 Virtualization- Top 10

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 08-05-2011, 08:25 AM   #10
hopkinskong
LQ Newbie
 
Registered: Aug 2011
Distribution: Ubuntu, Slackware Current
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by onebuck View Post
Hi,

Welcome to LQ!

As other LQ members have stated: once you use the 'rm' command then the files are unlinked/removed. You can sometimes recover files with other utilities but be forewarned that you cannot always recover without due effort.

(Linux is Not Windows) Refers to the GNU/Linux OS and various Free & Open-Source Software (FOSS) projects under the catch-all name of "Linux".

If you wish to learn what a command does then use 'man command' from the 'cli'. So 'man rm' will explain;
Just a few links to aid you to gaining some understanding;



1 Linux Documentation Project
2 Rute Tutorial & Exposition
3 Linux Command Guide
4 Bash Beginners Guide
5 Bash Reference Manual
6 Advanced Bash-Scripting Guide
7 Linux Newbie Admin Guide
8 LinuxSelfHelp
9 Utimate Linux Newbie Guide
10 Linux Home Networking
11 Virtualization- Top 10

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
yes, linux is not windows, but i just want to know how to COMPLETLY DELETE my files?
yes, rm is a way, but how do i remove a file permanently using Dolphin?
And where are my files i deleted? I am not going to recover it, i want to COMPLETLY DELETE it FROM THE DISK to REDUCE my harddisk space, cuz it still using my space now!

EDIT: I think u have misunderstand me:
Quote:
previously "deleted"
It refers to the files that i deteted using "SHIFT+DELETE", it still using up my harddisk space, not rm command

Thanks

Last edited by hopkinskong; 08-05-2011 at 10:53 AM.
 
Old 08-05-2011, 12:14 PM   #11
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
If you use the rm command then it unlinks the file so the space becomes "free", in the sense that it is available for overwriting. It makes no odds as to whether the file is physically deleted or not. If you are trying to remove sensitive information then consider using the shred command.
 
Old 08-05-2011, 01:54 PM   #12
hopkinskong
LQ Newbie
 
Registered: Aug 2011
Distribution: Ubuntu, Slackware Current
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by devnull10 View Post
If you use the rm command then it unlinks the file so the space becomes "free", in the sense that it is available for overwriting. It makes no odds as to whether the file is physically deleted or not. If you are trying to remove sensitive information then consider using the shred command.
So how to "free" up my space, cuz my "space" won't "free" up when i use SHIFT+DELETE, the files have disappeared in the folder, but the space still won't "free" up, i can't add new things to my harddrive because it is full!
 
Old 08-05-2011, 02:01 PM   #13
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

As you said in your previous posts that you have deleted the file from the location but system still shows that the partition is 100% full. You checked if the files are there in trash but they were not there.

Option that you can go with is run find to look for those files (suppose they were .doc or .pdf files) and then delete them. Command you can use is:

Code:
find / -name *.doc -print
The above command will print the files. Check and confirm if these are the files you want to delete. If yes, then run the command mentioned below:

Code:
find / -name *.doc -print -delete
Fyi: I tried this on my Ubuntu 10.04 and CentOS 5.5 and shift+delete does delete the file permanently but both of them uses nautilus not dolphin. I will try on Linux Mint 10 and will let you know if it works the same way.
 
Old 08-05-2011, 02:42 PM   #14
hopkinskong
LQ Newbie
 
Registered: Aug 2011
Distribution: Ubuntu, Slackware Current
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
As you said in your previous posts that you have deleted the file from the location but system still shows that the partition is 100% full. You checked if the files are there in trash but they were not there.

Option that you can go with is run find to look for those files (suppose they were .doc or .pdf files) and then delete them. Command you can use is:

Code:
find / -name *.doc -print
The above command will print the files. Check and confirm if these are the files you want to delete. If yes, then run the command mentioned below:

Code:
find / -name *.doc -print -delete
Fyi: I tried this on my Ubuntu 10.04 and CentOS 5.5 and shift+delete does delete the file permanently but both of them uses nautilus not dolphin. I will try on Linux Mint 10 and will let you know if it works the same way.
I tried to updatedb then locate that file, but i can't find it anymore, it just like that file has disappeared but it still using up your hardrive space
 
Old 08-05-2011, 02:59 PM   #15
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by T3RM1NVT0R View Post
The above command will print the files. Check and confirm if these are the files you want to delete. If yes, then run the command mentioned below:

Code:
find / -name *.doc -print -delete
Remember, that will delete every single *.doc file on your system, which is probably not what you want.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Create the file, write into that file but can't delete file in Linux pandunr Linux - Newbie 3 06-15-2011 08:45 AM
file from install ffmpeg conflicts w/file from package fmpeg-libs: which to delete? ybalazs Linux - Software 0 10-27-2009 01:21 AM
Upload file to ftp server -vsftp- but can not delete or change the file once uploaded murattas6 Linux - Server 2 06-26-2009 06:00 AM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 02:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:36 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