View previous topic :: View next topic |
Author |
Message |
o'bogamol Tux's lil' helper
Joined: 01 Nov 2009 Posts: 91 Location: Detroit, Michigan - The Home of Rock and Roll
|
Posted: Thu Jan 07, 2010 7:17 pm Post subject: Need some command line commands... |
|
|
First, when I use the command 'make menuconfig' it makes a file called '/somewhere/on/the/system/config.' .
If I used the Gentoo install disk and followed the Gentoo Handbook, then where would it be, and more importantly what command can I use to find files?
Also, I'd like to be able to run a command and save it's output to a file that I can later access. ...For example, 'lsmod' or 'lspci'
Finally, If I plug a flash disk into the usb (or in my case, a blackberry phone with a 2GB HD) where would I find it, so I can save the files via 'cp'
I have a functioning Gentoo Kernel installed but it's very basic and I'd like to post everything like that so that I can have the experts on the forum critique my installation.
Thanks in advance for your help!
Rob |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Thu Jan 07, 2010 7:40 pm Post subject: |
|
|
bogamol,
Your kernel .config file is found in /usr/src/<kernel-name>/.config
You are usually only interested on one kernel and its normal to have a symbolic link that points to it.
The link is always called /usr/src/linux, regardless of which kernel it points to,
Note that the filename .config starts with a dot, so it will not normally appear in listings. You must use to see it.
You use the command to find files. That can be very slow if it needs to search your entire filesystem.
There is also and locate uses a database, so its only as good as the most recent database update.
I think whereis searches the path ... its the one I use most.
You redirect the output from a command the redirect operator. Try
To put things directy on the web, use wgetpast. You need to emerge that before your use it.
returns a URL where your lspci output can be found
Code: | wgetpaste /some/file | does the same thing for the contents of a file.
Your flash disk will appear as /dev/sd... to find out what, look at the end of the output of thecommand.
It may or may not show partitions - flash drives are made in two sorts. Mount the partition if it has one, otherwise mount the whole device. Flash drives are usually formated with the vfat filesystem, so you need vfat support available to your kernel _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10655 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Jan 07, 2010 7:43 pm Post subject: Re: Need some command line commands... |
|
|
bogamol wrote: | First, when I use the command 'make menuconfig' it makes a file called '/somewhere/on/the/system/config.' . If I used the Gentoo install disk and followed the Gentoo Handbook, then where would it be, and more importantly what command can I use to find files? | That would be in your kernel source directory, typically "/usr/src/linux", and the name is ".config", not "config.". Use "ls". Type "man ls" to see all of the options. Note that file names that start with a period are not normally listed by ls. Use "ls -a" to see all files, includiung those. bogamol wrote: | Also, I'd like to be able to run a command and save it's output to a file that I can later access. ...For example, 'lsmod' or 'lspci' | Use the ">" redirection operator, like so: bogamol wrote: | Finally, If I plug a flash disk into the usb (or in my case, a blackberry phone with a 2GB HD) where would I find it, so I can save the files via 'cp' | If the USB drivers are properly part of your kernel, you'll see the USB stick as another SATA drive in /dev, such as "/dev/sdb1". If your install is in a very early stage of maturity, you won't have an automounter working yet and you'll need to mount it before you can access it, like so: Code: | mkdir -p /mnt/usb
mount /dev/sdb1 /mnt/usb | You can then copy files to it with cp as you would expect: Code: | cp myfile.txt /mnt/usb | but you need to explicitly unmount it to ensure that all writes have finished:
Makes sense?
- John
Edit: Neddy's fast! _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Jan 07, 2010 7:55 pm Post subject: |
|
|
First, when I use the command 'make menuconfig' it makes a file called '/somewhere/on/the/system/config.' .
/usr/src/linux/.config
If I used the Gentoo install disk and followed the Gentoo Handbook, then where would it be, and more importantly what command can I use to find files?
/usr/src/linux/.config
Code: |
find / filename
find 'startdirectory' 'filename' |
run for more info
Also, I'd like to be able to run a command and save it's output to a file that I can later access. ...For example, 'lsmod' or 'lspci'
Code: | lsmod > /lsmodoutputfile | will make if needed, replace if not /lsmodoutputfile with the output of lsmod
Code: | lsmod >> /lsmodoutputfile | will append the output of lsmod to /lsmodoutputfile
Finally, If I plug a flash disk into the usb (or in my case, a blackberry phone with a 2GB HD) where would I find it, so I can save the files via 'cp'
Assuming you have only one other disk type device:
Code: | mkdir /mnt/<clever mount point name>
mount /dev/sdb1 /mnt/<clever mount point name> |
Run google for linux commands and you will get a ton of free reference material |
|
Back to top |
|
|
o'bogamol Tux's lil' helper
Joined: 01 Nov 2009 Posts: 91 Location: Detroit, Michigan - The Home of Rock and Roll
|
Posted: Thu Jan 07, 2010 8:29 pm Post subject: |
|
|
Awesome, Thanks! |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Jan 07, 2010 9:15 pm Post subject: |
|
|
BTW,
if you emerged slocate:
slocate 'file name' runs a lot faster than find |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Thu Jan 07, 2010 9:27 pm Post subject: |
|
|
In fact, and when you update your box, you can run this after that :
This will update the database of slocate |
|
Back to top |
|
|
Mike Hunt Watchman
Joined: 19 Jul 2009 Posts: 5287
|
Posted: Thu Jan 07, 2010 10:25 pm Post subject: |
|
|
... and mlocate updates faster than slocate. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Jan 08, 2010 2:14 am Post subject: |
|
|
Never tried that one, but wgetpaste can safe your butt when you are in the dirt big time |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Jan 08, 2010 12:58 pm Post subject: |
|
|
In fact, he is too fast, it's not fair |
|
Back to top |
|
|
Mike Hunt Watchman
Joined: 19 Jul 2009 Posts: 5287
|
Posted: Fri Jan 08, 2010 4:43 pm Post subject: |
|
|
But, not as fast as Bracame |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sat Jan 09, 2010 3:31 am Post subject: |
|
|
In fact, a php bug |
|
Back to top |
|
|
|