Searching - looking for a better way
- Ed_P
- Contributor
- Posts: 7672
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Searching - looking for a better way
When I search for something that I have no where to look I set the spaceFM location to be /. I want to search every Porteus file and folder for it. Unfortunately / includes /mnt which includes all my hard drive partitions. PQSERVICE, SYSTEM RESERVED, BACKUPS and Acer not just the drive where porteus is located.
The other day I tried to find where Adobe Flash stores my Preferences, after an hr the search was still running and nothing had been found.
How do I config spaceFM to search all Porteus files and folders but not include all my hard drive partitions?
The other day I tried to find where Adobe Flash stores my Preferences, after an hr the search was still running and nothing had been found.
How do I config spaceFM to search all Porteus files and folders but not include all my hard drive partitions?
Ed
- francois
- Contributor
- Posts: 6311
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Re: Searching - looking for a better way
The slocate utility is stock on porteus 3.0. It is really fast. To get it going:
Example: locate *.iso will give you all the iso on your computer.
To get the arguments for locate:
Code: Select all
root@sensei:~# updatedb
root@sensei:~# locate *.iso
To get the arguments for locate:
Code: Select all
root@sensei:~# locate -h
Last edited by francois on 27 Apr 2014, 18:02, edited 1 time in total.
Prendre son temps, profiter de celui qui passe.
-
- Full of knowledge
- Posts: 1985
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: Searching - looking for a better way
@Ed

I would simply unmount them before searching..but not include all my hard drive partitions?

- fanthom
- Moderator Team
- Posts: 5589
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Searching - looking for a better way
I would simply unmount them before searching..
what about this:
this way you are searching only rootfs (aufs) and not /dev, /proc, /sys, external drives, mounted shares 
or better - do not mount/unmount anything and do a search in /mnt/live/memory then remove /mnt/live/memory/{changes,images} from path.
what about this:
Code: Select all
mkdir /mnt/root_fs
mount -o bind / /mnt/foot_fs
find /mnt/root_fs -name "*whatever*"

or better - do not mount/unmount anything and do a search in /mnt/live/memory then remove /mnt/live/memory/{changes,images} from path.
Please add [Solved] to your thread title if the solution was found.
- francois
- Contributor
- Posts: 6311
- Joined: 28 Dec 2010, 14:25
- Distribution: xfce plank porteus nemesis
- Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.
Re: Searching - looking for a better way
Midnight commander (mc) in command line, has a find function that permits you to select the path you are searching for.
Prendre son temps, profiter de celui qui passe.
- Ed_P
- Contributor
- Posts: 7672
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: Searching - looking for a better way
francois wrote:The slocate utility is stock on porteus 3.0. It is really fast. To get it going:Code: Select all
root@sensei:~# updatedb root@sensei:~# locate *.iso
donald wrote:I would simply unmount them before searching..
Some excellent suggestions guys. Thank you.fanthom wrote: what about this:this way you are searching only rootfs (aufs) and not /dev, /proc, /sys, external drives, mounted sharesCode: Select all
mkdir /mnt/root_fs mount -o bind / /mnt/foot_fs find /mnt/root_fs -name "*whatever*"
or better - do not mount/unmount anything and do a search in /mnt/live/memory then remove /mnt/live/memory/{changes,images} from path.

The unmounting suggestion should help but I'm not sure the other two, while certainly fast, will help in the search I was doing. a. I don't understand Porteus's folder structure so I don't know what folder/s to search in for an Adobe Flash file. b. I don't know what naming convention a Flash user config options file would take in Linux. c. To circumvent my limitations I was searching for the contents of a file that contained the Adobe Flash Trusted Location path that I entered and saved. Thus I could back it up and restore it the next time I booted. It isn't being saved in my save.dat file.
Ed
- Ed_P
- Contributor
- Posts: 7672
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: Searching - looking for a better way
I came across an interesting thread today that kinda relates to this quest. http://forum.porteus.org/viewtopic.php? ... b01#p24263 I tried the script and the commands but didn't get what I was expecting.
I was looking for files I had changed/made in my /home/guest folder recently similar to tb01's quest and found none. I tried the find --help command but that wasn't much help.
I did find the dir2xzm command an interesting find though.
Code: Select all
guest@porteus:~$ find /home/guest -mmin 600 -type d -name "*"
guest@porteus:~$ find /home/guest -mmin 60 -type d -name "*"
guest@porteus:~$ find /home/guest -mmin 200 -type d -name "*"
guest@porteus:~$
I did find the dir2xzm command an interesting find though.
Ed
- brokenman
- Site Admin
- Posts: 6104
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
- Contact:
Re: Searching - looking for a better way
Code: Select all
find /home/guest -mmin 200 -type d -name "*"
Use the -f switch to search for files changed/created.
Good to see you digging through files. Take a look in /opt/porteus-scripts/changes-time. Remove "$changes/home|" from line 30 and run it.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- Ed_P
- Contributor
- Posts: 7672
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: Searching - looking for a better way
Unfortunately
same results. Larger time value to cover changes made earlier.
The changes-time script change didn't fair much better
I saved the modified script in my /home/guest folder/directory so maybe that's the problem. But intrigued as to what this script does and will review it more before running it in it's native form.
Thanks brokenman.
Code: Select all
guest@porteus:~$ find /home/guest -mmin 600 -type f -name "*"
guest@porteus:~$
The changes-time script change didn't fair much better
Code: Select all
guest@porteus:~$ ./changes-time
bash: ./changes-time: Permission denied
guest@porteus:~$ su
Password:
root@porteus:/home/guest# ./changes-time
bash: ./changes-time: Permission denied
root@porteus:/home/guest#
Thanks brokenman.
Ed
- Ed_P
- Contributor
- Posts: 7672
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: Searching - looking for a better way
Still getting no where with the find command. Read the man find writeup and tried different options. Same result.

Code: Select all
guest@porteus:~$ find /home/guest -mmin 200 -type f -name "*"
guest@porteus:~$ su
Password:
root@porteus:/home/guest# find /home/guest -mmin 200 -type f -name "*"
root@porteus:/home/guest# find /home/guest/ -mmin 200 -type f -name "*"
root@porteus:/home/guest# find /home/guest/ -mmin 60 -type f -name "*"
root@porteus:/home/guest# find /home/guest -mmin 60 -type f -name "*"
root@porteus:/home/guest# find /home/guest -cmin 120 -type f -name "*"
root@porteus:/home/guest# find /home/guest -cmin 120 -type d -name "*"
root@porteus:/home/guest# find /home/guest/ -cmin 120 -type f -name "*"
root@porteus:/home/guest# find /home/guest/ -ctime 1 -type f -name "*"
root@porteus:/home/guest#

Ed
- Ed_P
- Contributor
- Posts: 7672
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: Searching - looking for a better way
In addition to find not working...

Code: Select all
guest@porteus:~$ unmount /mnt/sda1
bash: unmount: command not found
guest@porteus:~$ su
Password:
root@porteus:/home/guest# unmount /mnt/sda1
bash: unmount: command not found
root@porteus:/home/guest# ./unmount /mnt/sda1
bash: ./unmount: No such file or directory
root@porteus:/home/guest#

Ed
-
- Full of knowledge
- Posts: 1985
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: Searching - looking for a better way
umount... 
e.g.
umount /dev/sda1

e.g.
umount /dev/sda1
- brokenman
- Site Admin
- Posts: 6104
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
- Contact:
Re: Searching - looking for a better way
Try running bash scripts with: sh /path/to/script.sh
This way they will run whether they are executable or not.
If nothing is returned from the find command it means that no file was found with a new timestamp. This means that either adobe flash is not saving the configuration in a plain text config file (i suspect this is the case) or the file is updated somehow without the timestamp being modified.
This way they will run whether they are executable or not.
If nothing is returned from the find command it means that no file was found with a new timestamp. This means that either adobe flash is not saving the configuration in a plain text config file (i suspect this is the case) or the file is updated somehow without the timestamp being modified.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- Ed_P
- Contributor
- Posts: 7672
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.0 ISO
- Location: Western NY, USA
Re: Searching - looking for a better way
donald wrote:umount...
e.g.
umount /dev/sda1

Ok. Thanks.brokenman wrote:Try running bash scripts with: sh /path/to/script.sh
This way they will run whether they are executable or not.
The files I was hoping the find commands would show were .sh and .txt files that I had manually changed earlier, using Leafpad. I was hoping to find a command that would show me changes I had made, manually, and downloads so I could be sure to back them up before I shutdown.If nothing is returned from the find command it means that no file was found with a new timestamp.
I'm unclear as to if there is a limit to the mmin value, of either 60 or 99, but if so it could explain the problem.
Ed
- fanthom
- Moderator Team
- Posts: 5589
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Searching - looking for a better way
everything happens in /mnt/live/memory/changes directory - so just watch this one.
the rest is static.
the rest is static.
Please add [Solved] to your thread title if the solution was found.