|
|
|
|
![]() ![]() |
Jul 13 2006, 09:07 AM
Post
#1
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 21 Joined: 9-June 06 Member No.: 24,913 |
Post in this topic youre linux knowledge, things that makes linux live easier .
SWAP files are imporant, so if You installed a new Linux system, but forgot to set enough swap space for your needs, the swap utilities on Linux allow you to make a real file and use it as swap space. QUOTE The trick is to make a file and then tell the swapon program to use it. Here's how to create, for example, a 64 megs swap file on your root partition (of course make sure you have at least 64 megs free): dd if=/dev/zero of=/swapfile bs=1024 count=65536 This will make a 64 megs (about 67 millions bytes) file on your hard drive. You now need to initialize it: mkswap /swapfile 65536 sync And you can then add it to your swap pool: swapon /swapfile With that you have 64 megs of swap added. Don't forget to add the swapon command to your startup files so the command will be repeated at each reboot. |
|
|
|
Jul 13 2006, 09:21 AM
Post
#2
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 21 Joined: 9-June 06 Member No.: 24,913 |
How to find some files on linux, there is some command that are handy for this :
QUOTE which command. which is usually used to locate a program quickly. It just searches your PATH and returns the first instance it finds and the directory path to it. Take this example: % which bash /bin/bash From that you see that bash is in the + directory. This is a very limited command for searching, since it only searches your PATH. whereis A whereis search for bash should return this: % whereis bash bash: /bin/bash /usr/bin/bash /usr/man/man1/bash.1.gz This command not only told us where the actual program is located, but also where the online documentation is stored. find The find(1) command allows the user to search the filesystem with a rich collection of search predicates. Users may specify a search with filename wildcards, ranges of modification or creation times, or other advanced properties. For example, to search for the default = file on the system, the following command could be used. % find / -name xinitrc /var/X11R6/lib/xinit/xinitrc find will take a while to run, since it has to traverse the entire root directory tree. And if this command is run as a normal user, there will be permission denied error messages for directories that only root can see. But find found our file, so that’s good. It pretty slow. slocate The slocate(1) command searches the entire filesystem, just like the find command can do, but it searches a database instead of the actual filesystem. The database is set to automatically update every morning, so you have a somewhat fresh listing of files on your system. You can manually run updatedb(1) to update the slocate database (before running updatedb by hand, you must first su to the root user). example of slocate in action: % slocate xinitrc # we don’t have to go to the root /var/X11R6/lib/xinit/xinitrc /var/X11R6/lib/xinit/xinitrc.fvwm2 /var/X11R6/lib/xinit/xinitrc.openwin /var/X11R6/lib/xinit/xinitrc.twm With these commands, you should be able to find whatever you’re looking for on your Linux system. |
|
|
|
Jul 13 2006, 05:50 PM
Post
#3
|
|
|
Ancient Enigma ![]() Group: [MODERATOR] Posts: 1,769 Joined: 11-July 04 From: under the stars Member No.: 76 |
topic closed. as you can see, this is an attempt by member MYRMIDON to collect hosting credits by spamming the forums -- for which he was warned and suspended for 7 days.
in case anybody would like to continue this topic, simply post a new one, but make sure not to follow MYRMIDON's example, since we will catch on to you, and your hosting privileges with trap17 will ultimately suffer. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 6th September 2008 - 08:38 PM |