Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Can't delete a file in the trash on OSX 10.11.6 Post 302987990 by djfilms on Monday 19th of December 2016 10:46:57 AM
Old 12-19-2016
Can't delete a file in the trash on OSX 10.11.6

I use a Mac running OSX El Capitan = UNIX user the hood. After rearranging files on an external hard drive, I ended up with a folder in the trash containing a file called "~INITPicker 2.0". I cannot empty the trash, and so delete the file. I even tried terminal, using the rm file command and recursively remove folder command, all to no avail. I cannot re-name the offending file, as it tells me I can't. I think the problem is with the tilde in the name. Can any clever soul tell me how to delete this file using terminal (the Mac's command line utility)?

Any guidance gratefully received.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file permisions 2000 to OSX

Could anyone tell me how or point me in the right direction on how to save files from a 2000box to a OSX server with the correct file permissions. File goes over and the only person that has r/w permissions is the owner everyone else is read only. HELP!!! (2 Replies)
Discussion started by: mom
2 Replies

2. Solaris

Script for automatic deletion of trash file of mail server

Hi, I have a mail server with limited space and operating system is sun solaris 8 (sparc). I do not have provisions to increase the space for home directory. So i have to delete files from /home/username/mail/trash which are more than 10 days old automatically. So my script should be like... (1 Reply)
Discussion started by: crown2100bd
1 Replies

3. Filesystems, Disks and Memory

unix executable file problem on MAC OSX ??? please help

I've got this problem. My computers and external hard drives are converting many of my files to a Unix Executable File which has a grey terminal looking icon. I don't understand what is causing this to happen. It is happening to a large number of my image file of different formats and also... (1 Reply)
Discussion started by: chadb
1 Replies

4. Linux

Emptying Trash

Hi all i hope someone can help me, in gnome if you right click on trash, you get another menu appear 'Empty Trash' what i want to do is be able to edit this command so that it secure deletes the trash, where is that command? so i can edit it. thanks in advance for any help, Dave (shred -z -u ) (0 Replies)
Discussion started by: dave123
0 Replies

5. UNIX for Dummies Questions & Answers

Trash

Hello, I deleted a file accidentally using rm-f inside a folder. Is there any option/command to retrive the file or is it possible to recover from trash? or once the file is deleted, it is gone completely?? (2 Replies)
Discussion started by: sydney2008
2 Replies

6. Homework & Coursework Questions

Delete restore and empty trash

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A set of Linux shell scripts is required to allow users to ‘remove' files without them really disappearing... (1 Reply)
Discussion started by: mr100perecent
1 Replies

7. Solaris

trash can in solaris

one quick question please.. is Solaris have a RECYLE BIN,or TRASH to retrive deleted files accidently ? (0 Replies)
Discussion started by: Sojourner
0 Replies

8. Shell Programming and Scripting

File Locking with fcntl on Darwin Mac OSX

Hello I have a Perl script that works on non-darwin Mac OS X environments and I think I have narrowed down the issue to a file locking problem. In other linux environments, the flock struct is defined differently. I have adjusted this via the reference for Mac OS X fcntl(2) man page. The... (4 Replies)
Discussion started by: flagman5
4 Replies

9. UNIX for Beginners Questions & Answers

XFCE Desktop - trash, cannot execute file, command prompt here missing.

Hi there, I am using the xfce4 is already the newest version (4.12.5). thunar is already the newest version (1.8.4-1). The distribution is Linux kali 4.19.0-kali1-amd64 #1 SMP Debian 4.19.13-1kali1 (2019-01-03) x86_64 GNU/Linux However, the problem is: When I when I click on any program to... (2 Replies)
Discussion started by: alvinoo
2 Replies
AUTOTRASH(1)						      General Commands Manual						      AUTOTRASH(1)

NAME
autotrash -- program to automatically purge old files from the FreeDesktop.org trash SYNOPSIS
autotrash [-d purge_n_days_old] autotrash [--delete number_of_megabytes_to_purge] autotrash [--keep-free number_of_megabytes_to_free] DESCRIPTION
autotrash is a program that looks in a FreeDesktop.org Trash folder for information on it's contents and then purges a part of the trash depending on the options. The most common option is -d, which will purge files that have been in the trash for more then a given number of days. The option --delete will remove at least the given number of megabytes from the trash, removing the oldest trash first. Using --keep-free will make sure at least the given number of megabytes of free space is available, by automatically setting --delete to the right value. For example, to keep at least a 1GB of free space, removing files from the trash if needed, use autotrash --keep-free 1024 . OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). -h --help Show a summary of options. -d DAYS --days DAYS Purge files older than DAYS number of days. -T PATH --trash-path PATH Use the given path as the location of the Trash directory, instead of the default: ~/.local/share/Trash . --max-free M Only purge files if there is less than M megabytes of free space left at the trash location. As an example, if you set this to 1024, then autotrash will only start to work if there is less than 1GB of free space in the trash. Till that time, autotrash will just exit normally without scanning the Trash directory. If unsure, try running autotrash with --dry-run and --verbose to see the effect. --delete M Purge at least M megabytes, deleting oldest trash addition first. It uses trash entries, NOT individual files. This means that if your oldest trashed item is a 1GB directory, and you request at least 10MB to be removed (M=10), autotrash will remove 1GB. If unsure, try running autotrash with both --dry-run and --stat to see the effect. --min-free M --keep-free M Make sure there is a minimum of M megabytes of free space. If there is less free space, set --delete to the difference between M and the amount of free space. If unsure, try running autotrash with --dry-run and --verbose to see the effect. -D REGEX --delete-first REGEX Purge any file which matches REGEX first, regardless of it's time-stamp. REGEX must be a valid regular expression. If this option is used multiple times, the files matching the first regular expression are deleted first, then the second etc. Example, delete any *.avi files first, then by age: --delete-first '.*.avi' -v --verbose Output information on what is happening and why. -q --quiet Only output warnings. --check Report .trashinfo files that point to a non-existing file. This will only happen with a broken Trashcan. It is left up to the user to actually do something with this information. These files will be removed as soon as the mentioned file would be removed by autotrash. --dry-run Only list what would be done, but actually do nothing. --stat Show the number, and total size of files involved. -V --version Show the version of program. EXAMPLES
Examples of program use. autotrash -d 30 Purge any file that has been in the trash for more then 30 days. autotrash --max-free 1024 -d 30 Only purge files from the trash if there is less than 1GB of space left on the trash filesystem. If so, only trash files that are older than 30 days. autotrash --min-free 2048 Purge files from trash, oldest first, till there is at least 2GB of space on the trash filesystem. There is no restriction on how old trashed files are. autotrash --min-free 2048 -D '.*.bak' -D '.*.avi' Purge files from trash till there is at least 2GB of space on the trash filesystem. If we need to remove files, make sure we remove *.bak files first, then all *.avi files and after that the oldest to the newest. There is no restriction on how old trashed files can get. Please note that '.*.bak' and '.*.avi' are regular expressions and not glob patterns. Given that they are regular expressions, using -D '.*.(png|gif|jpg|jpeg)' will match images with any of the given extensions. autotrash --max-free 4000 --min-free 2048 -d 30 Start reading the trash if there is less than 4000MB of free space, then start keeping an eye on. At that point, remove files older than 30 days and if there is less than 2GB of free space after that remove even newer files. @hourly /usr/bin/autotrash --max-free 4000 --min-free 2048 -d 30 Experienced users should consider adding autotrash as a crontab entry, using crontab -e and adding the line above. AUTHOR
This manual page was written by A. Bram Neijt bram@neijt.nl for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. AUTOTRASH(1)
All times are GMT -4. The time now is 03:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy