Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Unix/Linux command - search for a file

Thread Tools
 
Search this Thread
 
Old 29 July 2003, 11:49 AM
  #1  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Question

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
Old 29 July 2003, 11:53 AM
  #2  
stevem2k
Scooby Regular
 
stevem2k's Avatar
 
Join Date: Sep 2001
Location: Kingston ( Surrey, not Jamaica )
Posts: 4,670
Likes: 0
Received 0 Likes on 0 Posts
Post

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

steve


That wasn't so difficult, now was it .
Old 29 July 2003, 11:54 AM
  #3  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

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.
Old 29 July 2003, 11:57 AM
  #4  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Thumbs up

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
Old 29 July 2003, 12:00 PM
  #5  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Question

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
Old 29 July 2003, 12:10 PM
  #6  
Zanlin
Scooby Regular
 
Zanlin's Avatar
 
Join Date: Sep 2002
Posts: 56
Likes: 0
Received 0 Likes on 0 Posts
Cool

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
Old 29 July 2003, 12:15 PM
  #7  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

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
Old 29 July 2003, 12:20 PM
  #8  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

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
Old 29 July 2003, 12:20 PM
  #9  
Zanlin
Scooby Regular
 
Zanlin's Avatar
 
Join Date: Sep 2002
Posts: 56
Likes: 0
Received 0 Likes on 0 Posts
Post

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]
Old 29 July 2003, 12:32 PM
  #10  
stevem2k
Scooby Regular
 
stevem2k's Avatar
 
Join Date: Sep 2001
Location: Kingston ( Surrey, not Jamaica )
Posts: 4,670
Likes: 0
Received 0 Likes on 0 Posts
Post

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
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
TylerD529
General Technical
2
09 October 2015 01:53 AM
mistermexican
General Technical
2
01 October 2015 04:30 PM
the shreksta
Other Marques
26
01 October 2015 02:30 PM
Nick_Cat
Computer & Technology Related
2
26 September 2015 08:00 AM
Littleted
Computer & Technology Related
0
25 September 2015 08:44 AM



Quick Reply: Unix/Linux command - search for a file



All times are GMT +1. The time now is 02:49 PM.