Guest anon Posted September 13, 2003 Report Share Posted September 13, 2003 ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Blocking pings to your server/ box LOST #301 This is dependent upon the setting at /proc/sys/net/ipv4/icmp_ echo_ignore_all. A "0" value blocks and "1" allows. viz: '#echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all' [block] '#echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all' [Allow] ####[bish (at) nde.vsnl.net.in]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Simple backup system (with tar) LOST #302 The simplest method is to make a listfile | Sample listfile: containing what all you want to back up, | and do: | /etc/passwd tar -czvf backup.tar.gz -T listfile | /etc/group [man tar for details of -T option] | /home/joe/project ####[bish (at) nde.vsnl.net.in]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Copying from one CD to another LOST #303 #dd if=/dev/cdrom of=datacd.iso #cdrecord -vv -eject -pad dev=0,0,0 speed=N datacd.iso [Note: Replace dev=0,0,0 with the output of cdrecord -scanbus for your system. Replace N in speed= with 2,4,8 depending on the speed of your CD-writer. Also add -J switch if Joliet ext are needed for M$ CDs] ####[rajesh (at) symonds.net]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Making an exact copy of a VCD/ audio CD LOST #304 Take a look at cdrdao Homepage: http://cdrdao.sourceforge.net/ With "cdrdao" you can create an exact image of a CD and then burn this image on a CD-R. Specially useful in case of VCD's. ####[rajesh (at) symonds.net]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : No password login as user (#2) LOST #305 Fed up of typing password for every login as an user? Type in passwd -d <username> as root to disable password for the user. Also handy in situations of forgotten passwords ... ####[kumarayil (at) eth.net]################################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Files only ls LOST #306 To have ls (in colour) of only files (no directory listing): alias lsf='ls -lF --color="yes" | grep -v "/" | less -r' ####[Discussions on LIH: 24 Apr 2002]######################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : man pages during programming with emacs LOST #307 Adding the following to your .emacs file and hitting F1 when the cursor is over a particular library call will bring up the man page for that library: (global-set-key [(f1)] (lambda () (interactive) (manual-entry current-word)))) ####[krishna (at) myrealbox.com]############################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Tracking your reboots [#1] LOST #308 To know the history of your last few re-boot sequences, do: #cat /var/log/messages | grep -n syslogd syslogd is the first to mark itself on this file at every re- boot, and it is done once only. The -n is to get the line no. ####[bish (at) nde.vsnl.net.in]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Tracking your reboots [#2] LOST #309 To know the history of your last few re-boot sequences, do: $last reboot last looks back in the wtmp file for all logins. The pseudo user "reboot" also logs in at all reboots of the system ####[rohanalmeida (at) it-om.com]############################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Command line shortcuts (clear) LOST #310 Tired of typing in "clear" every time you want the screen to be cleared ? Press [Ctrl-L] ... This works for most shells, (except for ash, bsh and ksh) ####[rtorvi (at) vsnl.net]#################################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Capturing screen output under X [#1] LOST #311 Take a X11 dump file with "xwd" and convert it to pnm: $xwd -out filename.xwd $xwdtopnm filename.xwd > newfile.pnm Now you can edit this file under any graphics package. ####[yash (at) delhicall.com]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Capturing screen output under X [#2] LOST #312 If you have gimp installed, one of the easiest methods is: Go to File -> Aquire-> screenshot ####[yash (at) delhicall.com]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Checking for setuid programs LOST #313 These are programs executed with superuser permissions invoked by call to function setuid() ... a potential security hazard. To know which all programs on your system are set suid, do: 'find / -user root -mount -perm -4000 print' ####[bish (at) nde.vsnl.net.in]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Periodic mail retreival (fetchmail) LOST #314 In daemon mode, fetchmail puts itself in background and runs forever, querying each specified host and then sleeping for the given polling interval. [ e.g. fetchmail -d 900 ] ####[bish (at) nde.vsnl.net.in]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Random Numbers LOST #315 Want a random number for any purpose ? If your shell is bash, type in "echo $RANDOM". The variable RANDOM would always be there ready for your use. ####[bish (at) nde.vsnl.net.in]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Random Data LOST #316 If you have need for a sequence of random bytes, type in: "head -c 16 /dev/random | mimencode" ... This will produce 16 bytes of random data. Since output of /dev/random and /dev/ urandom is binary, pipe through mimencode to get ASCII output ####[inzoik (at) yahoo.com]################################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : State codes output by ps command LOST #317 o D uninterruptible sleep (usually IO) o R runnable (on run queue) o S sleeping o T traced or stopped o Z a defunct ("zombie") process ####[siddhant (at) rediffmail.com]############################ : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Booting M$ from secondary HDD LOST #318 other=/dev/hdb1 | Make an entry in /etc/lilo.conf as label=DOS | shown to boot M$ from secondary HDD. table=/dev/hdb | This leads BIOS to believe that /hdb map-drive = 0x80 | (secondary HDD) is the primary and to = 0x81 | boots M$/Win normally ... Handy when map-drive = 0x81 | you swap your HDDs around on adding to = 0x80 | a second hard disk ... ####[perisat (at) yahoo.com]################################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Inodes on a partition LOST #319 To find out the number of inodes on existing partitions, the number you have used, percentage of inodes used and the number still free; try: 'df -i' ####[dvb (at) users.sourceforge.net]########################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : What is a niced task ? LOST #320 The nice value represents the priority of a process. The lower the value the faster the process runs. The range of this value is from -20 to 19, the default being 0. A "niced task" is the one whose nice value is negative. ####[akj (at) cyberspace.org]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Changing priority of a process LOST #321 The nice value represents the priority of a process. The lower the value, the faster the process runs. Range from -20 to 19. The nice(1) command is used to run a program with modified scheduling priority.The renice(1) command can be used to alter priority of running processes. See the man pages for details. ####[akj (at) cyberspace.org]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Multicolumn output of ls to a file LOST #322 If you do: "$ls > txtfile", the txtfile will contain a single column output. However if you try:"$ ls -C > txtfile" you will see that the txtfile now contains columned output. The column feature of ls is dependent upon the isatty(stdout) value. You may even try: "$ls --color -C > txtfile", then, "$cat txtfile" ####[arc_of_descent (at) gmx.net]############################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Querying the time stamp of a file LOST #323 "$ls -al filename" gives the details most of us need. But for specific query for the detailed time stamp of any file or dir, try: "$date -r filename". ####[siddhant (at) rediffmail.com]############################ : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Finding out files larger than given size LOST #324 To find out all files in a dir over a given size, try: find /path/to/dir_of_file -type f -size +Nk [Where N is a number like 1024 for 1mb, and multiples thereof] ####[Discussions on LIH : 04 Jul 2002]######################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Password in .fetchmailrc file LOST #325 Worried that someone may look at your POP3 password for your mailbox in your .fetchmailrc file ? DON'T enter it at all. If the password is omitted, or there is error in password authentication fetchmail gives a prompt to re-enter password. ####[kumarayil (at) eth.net]################################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Handling *.doc files in Linux LOST #326 Recieved a MSOffice *.doc format file from someone? Use the wv package (www.wvWare.com). Wv is a program that understands the MS-Word 6/7/8/9 file format and is able to convert to HTML. Do '$wvHtml idiotic_attachment.doc nicefile.html' ... Thats it. ####[unmadindu (at) Softhome.net]############################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : What all is mounted ? [#2] LOST #327 To know all mounted devices, simply type : $mount In GNU mount, when mount is evoked without any parameters it does a "cat /proc/mounts". Much less typing, is'nt it ? ####[deepak (at) despammed.com]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Shortcut for evolution mailer with GNOME LOST #328 Are you using GNOME and evolution mailer? You may create a new launcher on the taskbar.Use "evolution mailto:" in the Command property.Set some suitable icon. Clicking on the launcher will get you to compose mode for a new message. ####[sameerds (at) it.iitb.ac.in]############################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Handling compressed files under emacs LOST #329 "M-x auto-compression-mode" puts you in a mode that allows you to open compressed files directly in emacs,view their contents edit them and save the contents as compressed files as if they were normal files. Works with compress, gzip, bzip2 files. ####[gaurav (at) symonds.net]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : File access over FTP using emacs LOST #330 "C-x-f /gaurav (at) symonds.net:~/foo" will connect via FT symonds.net, prompt me for a password, GET foo, allow me to edit it and will save the file by a PUT back at symonds. Simi- larly a "C-x-s /gaurav (at) symonds.net:~/bar" will save ba symonds.net via FTP. ####[gaurav (at) symonds.net]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : bash shortcuts: all available commands LOST #331 Want to see all the commands you can enter at the prompt of your existing set-up ? Press: $ [TAB][TAB] If you want to store this in a file, use the script program. $ script filename $ [TAB][TAB] $ exit ####[deepak (at) despammed.com]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Lesser known commands (watch) LOST #332 Want to run a command periodically? Just type: $ watch <cmd> watch runs a command repeatedly, displaying the first screen. This allows you to watch the program output change over time. Look at its man page for details. ####[deepak (at) despammed.com]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Remote desktop sharing in Linux LOST #333 Have a network with heterogeneous machines and you would like to share your Linux desktop over the network? Try: VNC Visit http://www.uk.research.att.com/vnc/ ####[unmadindu (at) Softhome.net]############################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : bash keystrokes (#1) LOST #334 C-a : beginning of line C = Ctrl key C-e : end of line M = Meta/ Alt key M-b : backward-word M-f : forward-word ####[gaurav (at) symonds.net]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : bash keystrokes (#2) LOST #335 C-k : cut to end of line C-u : cut backwards to beginning of line C-w : cut backwards one word [C = Ctrl key] C-y : yank cut text [M = Meta/ Alt key] ####[gaurav (at) symonds.net]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : bash keystrokes (#3) LOST #336 C-t : transpose character under cursor and before cursor M-t : transpose word under cursor and word before M-u : convert word after cursor to uppercase M-l : convert word after cursor to lowercase [C = Ctrl key] M-c : convert word after cursor to mixed case [M = Meta/Alt] ####[gaurav (at) symonds.net]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : bash keystrokes (#4) LOST #337 C-l : clear screen [C = Ctrl key] C-_ : undo last action C-r : reverse search in history with completion as you type (even searches through different arguments) ####[gaurav (at) symonds.net]################################# : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Handling *.doc files in Linux LOST #338 Use wvWare (www.wvWare.com). wvWare is a suite of applications that converts Microsoft Word Documents (versions 2,5,6,7,8,9) into more useful formats such as HTML, LaTeX, ABW, WML, Text, etc ... wvWare is also a library which can be used by other applications to import Word documents. ####[Discussions: howtos (at) frodo.hserus.net 14/07/02]###### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Origins of GNU/Linux System LOST #339 Do you know about the origin of GNU/Linux and how to use it ? Visit: http://www.gnu.org/gnu/linux-and-gnu.html ####[rms (at) gnu.org]######################################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Delete current character (bash console) LOST #340 bash has its own keybindings defined in ~/.inputrc. To delete current char (instead of getting a "~") enter in ~/.inputrc: set editing-mode emacs "e[3~":delete-char ####[bish (at) nde.vsnl.net.in]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Securing your FTP server (proftp) LOST #341 To deny users accessing root directory ("/") thru ftp put this line in your /etc/proftpd.conf: DefaultRoot ~ Now ftp-users cannot do "cd /" and access the server root dir. ####[kumarayil (at) eth.net]################################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Screenshot of text console LOST #342 To take screen shots of a console, do: #cat /dev/vcsN > filename [where N is the tty to be captured] This needs root privileges. Not suitable for graphic images on console (e.g. through zgv). ####[rupeshnagar (at) gmx.net]################################ : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Knowing your run-time X configuration LOST #343 To know the run-time configuration of your X server in full detail, inclusive of version, config files, chipset etc do: o X --probeonly 2> filename o less filename ####[sub_scriber (at) lycos.com]############################## : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Origins of GNU/Linux System [#2] LOST #344 / Recognise this ASCII-art ? ((__-^^-,-^^-__)) Want to know about the origins of `-_---' `---_-' "Linux" and its use ? `--|o` 'o|--' ) `(/ Visit: :o_o: http://www.gnu.org/gnu/linux-and-gnu.html "-" ####[rms (at) gnu.org]######################################## : % : ####[GNU][ Linux One Stanza Tip (LOST) ]###################### Sub : Volume label of ext2 filesystem [#1] LOST #345 '#tune2fs -L volume-label' sets volume label of an ext2 file- system. Labels can be at most 16 characters long. The volume can be used by mount(8), fsck(8), and /etc/fstab(5). ####[bish (at) nde.vsnl.net.in]############################### : % : ####[GNU/Linux One Stanza Tip (LOST) ]######################## Sub : Speeding kernel compilations LOST #346 Split the process "make bzImage/ vmlinuz" into many parallel processes by adding "-jN" option. [ viz. "make bzImage -j4", where it is being broken into 4 processes]. To determine the ideal value for N, use following formula: N=((RAM in Mb/8)+1) ####[ajitabhpandey (at) users.sourceforge.net]################ : % : ####[GNU][ Linux One Stanza Tip (LOST) ]###################### Sub : Volume label of ext2 filesystem [#2] LOST #347 To display or change the filesystem label on an ext2 file system located on a device, use the "e2label" utility from the e2fsprogs package. Usage: e2label device [ new-label ] ####[bish (at) nde.vsnl.net.in]############################### : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : What is mounted where [#1] LOST #348 Wondering how to find out which named partition is mounted on which device ? Try: 'mount' (without arguments) ... you will have a list of all filesystems (with device type) and where they are mounted. ####[linuxmani (at) myrealbox.com]############################ : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : What is mounted where [#2] LOST #349 Wondering how to find out which named partition is mounted on which device ? Try: 'df' or 'df -h' ... you will have a list of all filesystems and on which device they are mounted. ####[linux (at) rousselot.org]################################ : % : ####[ GNU/Linux One Stanza Tip (LOST) ]####################### Sub : Lesser known commands (pinky) LOST #350 "Who fingered Pinky ?" ... You probably know of who and finger but have you heard of 'pinky' ? Just type "pinky" and see. It is from the GNU sh-utils package. ####[bish (at) nde.vsnl.net.in]############################### : Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.