ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   Unix/Linux command - search for a file (https://www.scoobynet.com/computer-and-technology-related-34/234846-unix-linux-command-search-for-a-file.html)

ozzy 29 July 2003 11:49 AM

I have a Linux box (RH kernel) and I need to locate a file.

What's the equivelant of "dir lic* /s" ???

no doubt, it'll be about 100 characters long ;)

Stefan

stevem2k 29 July 2003 11:53 AM

find / -name lic* (if you have no idea where it is)

steve


That wasn't so difficult, now was it :D .

stevencotton 29 July 2003 11:54 AM

As root run 'updatedb', RH may well do that in cron, dunno. Then you just need to 'locate <file>'. updatedb builds a database of all files, so newly installed stuff wont show unless updatedb is run.

ozzy 29 July 2003 11:57 AM

cheers guys, the find command found the two I was after.

I'll admit that wasn't difficult; I'm just mentally scared from having to figure out tar switches in a previous life :)

Stefan

ozzy 29 July 2003 12:00 PM

OK, next question. Need to copy these files from one box to another. Both run RH, but have no net access and limited commands (it's a secure build of RH e.g. no updatedb command)

How do you mount the floppy and copy files?

Stefan

Zanlin 29 July 2003 12:10 PM

Being particularly lazy I use the mtools, RPMs on the disk. Then use DOS commands with an m at the front and treat it as an a: drive

ozzy 29 July 2003 12:15 PM

yeah, I'd like to be lazy too, but I can't install anything on these boxes. It's a firewall product that just happens to use a RH kernel. It doesn't even have ping installed :)

Stefan

ozzy 29 July 2003 12:20 PM

OK, after a quick nosey around Google I found these commands, which thankfully worked for me.

mount -t /dev/fd0 /mnt/floppy
cp <filename> /mnt/floppy
umount /mnt/floppy

Stefan

Zanlin 29 July 2003 12:20 PM

in that case, on redHat:

mount /dev/fd0
ls /mnt/floppy

This assumes you have one floppy and its listed in /etc/fstab. You may need to be superuser to do this on some sysems.

You beat me to it :-)

[Edited by Zanlin - 7/29/2003 12:22:14 PM]

stevem2k 29 July 2003 12:32 PM

if they can see each other then scp would be ideal. ( assuming ssh installed )

Steve

scp filename user@machine2:/path/to/where/you/want/it


All times are GMT +1. The time now is 06:14 PM.


© 2024 MH Sub I, LLC dba Internet Brands