Register
It is currently Sat Oct 25, 2014 9:41 pm

Script to Remove ~/.gvfs


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sun Dec 18, 2011 5:44 pm   

Joined: Sun Dec 18, 2011 5:33 pm
Posts: 1
Good Day

A wee bit of puzzle for me. Hope someone can help. I am using Linux Mint KDE 4.7.2.

A sudo BASH script using rsync fails when it contacts ~/.gvfs. I run a cron root script to do a system incremental backup. Unfortunately, 'sudo ls -al' does not show ~/.gvfs neither does 'kdesudo dolphin'. Apparently ~/.gvfs is a mounted folder in the user directory that is used to hold a GNOME file system(?). It is above my technical grade but a search for 'remove .gvfs' will return hundreds maybe thousands of hits. The ~/.gvfs directory is read only for the user and forbidden for everyone else. I cannot change the permissions unless I umount the directory first(?).

At the command line I can use:

sudo umount -fl /home/???/.gvfs
sudo -R chmod 755 /home/???/.gvfs
sudo rm -vR /home/???/.gvfs/*
sudo rmdir -v /home/???/.gvfs

and everything works. No more ~/.gvfs.

But as soon as I incorporate it into a script, nothing works. It is as if the following code was none existent:

(run as root)
# remove .gvfs directory/files
if [ -d /home/???/.gvfs ]; then
exit
umount -fl /home/???/.gvfs
sudo -R chmod 755 /home/???/.gvfs
rm -vR /home/???/.gvfs/*
rmdir -v /home/???/.gvfs
if [ -d /home/???/.gvfs ]; then
echo "Removing /home/???/.gvfs failed!"
fi
fi

Exit is never accessed. It is bypassed everytime. I have tried '-e' and '-h' and '-L'.

I know I can insert --exclude=/home/???/.gvfs into the rsync command line but that is, in my opinion, a last resort. Getting rid of the original bug and some extremely large files is my number one priority. gvfs has too many dependencies to remove and it keeps regenerating after I remove it. Worst thing is that I do not use GNOME but I still have the files.

What I need to do is run a root script and delete ~/.gvfs. Any ideas?

Please . . .


Top
 Profile  
 PostPosted: Thu Jul 05, 2012 1:17 pm   

Joined: Thu Jul 05, 2012 1:13 pm
Posts: 1
See http://www.susetips.com/2009/03/13/how- ... directory/

"Well, the .gvfs is a filesystem, so you can umount it!"


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP