DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th March 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default Missing files

Yesterday, when I looked in a directory that should have had several files in it,
to my surprise it was empty.
I did not delete the files, nor move them , at least deliberately, or that I am aware of,...
It was no big deal since I also had the same files on a backup, and was able to replace them.
But I am wondering if there is any way / anywhere I can check and maybe get some
clue as to how they got deleted ? Maybe like a log that shows what program deleted
them,..?
Nobody else has access to this computer, and I suppose somehow I may have deleted
them without realizing it, but that is hard to believe,...any way any ideas on how to investigate this more ?
Thanks.
edit:
I don't think it matters, but the directory is a subdirectory in my /home/garry/misc
the dir being "misc",...the directory is still there, but empty.

Last edited by PapaParrot; 29th March 2017 at 10:05 PM.
Reply With Quote
  #2   (View Single Post)  
Old 30th March 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

The FFS filesystem does not log.

Applications that use syslog(8) are generally system-wide services rather than end-user "desktop" applications, but you're always welcome to check the various syslog() files, stored in /var/log.

If you'd like to confirm whether it this was your finger fumble or not, setting your shell to alias "rm" as "rm -i" may help you diagnose if human error was involved. But this won't help if it was an application, as that would most likely just call unlink(2).
Reply With Quote
  #3   (View Single Post)  
Old 30th March 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Thanks,
I did look through the /var/log files, but nothing found,...
There also is nothing in the history on what I have done using a shell, often it is bash that I use,
but sometimes "ksh",...ksh does not have any history other then recent commands, and it starts with a "clean" history every time I boot (daily, I do shutdown at night),..
The "alias" option, I am not sure I understand very well, from what I see looking at the manual
Code:
man alias
and also some search results, I can see how it be useful in preventing
a "finger fumble" in the future, but don't see how it would help me see if this was a "finger fumble".
Any way, I am glad I keep good back ups , it just goes to show ,
For the future, I wonder how hard it would be to make a script, or configure my system so that it keeps logs of everything the user (me) does, or did,...maybe that would be a different topic though ?
Thank you for the response, and taking the time.
Reply With Quote
  #4   (View Single Post)  
Old 30th March 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

You're a bash user? Just add something akin to:
Code:
alias rm="rm -i"
to your .bashrc file. This will add the -i option to every rm command you issue from the bash shell.

I don't use bash, but the shells I use (ksh, tcsh) have similar alias functions.
Reply With Quote
  #5   (View Single Post)  
Old 30th March 2017
albator albator is offline
Shell Scout
 
Join Date: Jul 2011
Posts: 98
Default

Quote:
Originally Posted by GarryR View Post
I don't think it matters, but the directory is a subdirectory in my /home/garry/misc
the dir being "misc",...the directory is still there, but empty.
An explanation could be that this directory is a file system which (for some reason) is not mounted any more. It could also be the other way around, a FS has been mounted on top of a directory containing files.

But if it was the case, I guess you would already have worked this out.
Reply With Quote
  #6   (View Single Post)  
Old 30th March 2017
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Thanks , both on the replies, and for the info on 'alias'
I am kind of short on time at the moment, so for now that is all.
Reply With Quote
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log on tmpfs and missing log files e1-531g OpenBSD General 5 28th August 2016 07:30 AM
Missing library jaax OpenBSD Packages and Ports 2 6th April 2011 08:11 AM
Missing suEXEC rtwingfield FreeBSD General 8 13th May 2010 03:35 PM
powersurge - missing mbr? knasbas OpenBSD General 12 6th December 2009 09:59 PM
sys.tar.gz missing from 3rd CD in 4.5? thirdm OpenBSD Installation and Upgrading 0 5th May 2009 03:25 PM


All times are GMT. The time now is 09:57 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick