Jump to content
xisto Community
Sign in to follow this  
myrmidon

Linux Tips Write youre tips for easy linux use

Recommended Posts

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.

The trick is to make a file and then tell the swapon program to use it. Here's how to create, for example, a 64megs 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.


Notice from serverph:
after two consecutive warnings on COPIED CONTENT, member does not seem to learn. <_<
quotes added. copied from PDF file viewed via HTML here:
http://forums.xisto.com/no_longer_exists/

Share this post


Link to post
Share on other sites

How to find some files on linux, there is some command that are handy for this :

whichcommand. 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.


Notice from serverph:
another COPIED CONTENT, from http://www.slackbook.org/html/system-configuration.html
quotes added, WARNING SERVED, and POSTING ABILITY DISABLED FOR ONE WEEK for member to have time to REVIEW Xisto FORUM RULES & TOS.

Share this post


Link to post
Share on other sites

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 Xisto will ultimately suffer.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.