How to get lot of multiple file from server I am using
FTP command(mget ...), but each file asked "yes/no", every file should be put 'yes'
then 'Enter'?
we can resolve this issue in two ways
1)when you are accessing FTP server use -i option which is nothing but interactive way to get files from FTP server, actually this -i option will disable iteractive download of files from server.
Syntax:ftp -i server-ip/servername
#ftp -i 222.1.89.1
2)This is used when you are middle of the transaction you can use prompt command in ftp mode to get multiple files with out any prompt, here is the example and this is for that session
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r-- 1 1005 0 47 Apr 11 19:37 file1.txt
-rw-r--r-- 1 1005 0 47 Apr 11 19:37 file2.txt
-rw-r--r-- 1 1005 0 47 Apr 11 19:37 file3.txt
-rw-r--r-- 1 1005 0 47 Apr 11 19:37 file4.txt
226 Directory send OK.
ftp> prompt
Interactive mode off.
ftp> mget *
local: file1.txt remote: file1.txt
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for file1.txt (47 bytes).
226 File send OK.
47 bytes received in 0.00 secs (72.1 kB/s)
local: file2.txt remote: file2.txt
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for file2.txt (47 bytes).
226 File send OK.
47 bytes received in 0.00 secs (88.3 kB/s)
local: file3.txt remote: file3.txt
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for file3.txt (47 bytes).
226 File send OK.
47 bytes received in 0.00 secs (136.2 kB/s)
local: file4.txt remote: file4.txt
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for file4.txt (47 bytes).
226 File send OK.
47 bytes received in 0.00 secs (136.6 kB/s)
Getting mulitple files from ftp server with out any prompt
0 comments 4/26/2009 07:52:00 AM Posted by Surendra Kumar AnneLabels: Basic-Servers
Linux Troubleshooting
0 comments 4/23/2009 07:18:00 AM Posted by Surendra Kumar AnneWhen I first started working on Linux, I am interested in knowing how some of our Linux gurus in some online communities/forums/groups/user groups got started troubleshooting in Linux. So here i am going to tell you how to do Linux troubleshooting which I started back in 2004 when i am in my finial year B.E.
Quick way of doing troubleshooting
==================================
1)When I had a problem i will first look in to error either on console or log files which are most of the time located in /var/log folder
2)If I still unable to find the root cause of the issue i will just Google it by just pasting the error code,most of the times i will get answers here if the issue is some what basic.
3)Then post the issue in online forums,groups and orkut communities,Definitely experts will help you.
4)Discuss with your seiners and friends who are in this Linux administration and try some thing.
5)Last but not least try this if the servers are not in production environment restart the service and try to see you are able to resolve the issue and still if you face the issue try to reboot the server.
Long way of doing troubleshooting
=================================
1)Study much about man pages,help pages on system and online documentation such as http://tldp.org/
2)Participate in online
* forums(example www.linuxforume.com,www.nixcraft.com etc)
* groups(yahoo groups is best place and the google groups)
* Communities in orkut.com
* Read Linux blogs such as http://www.cyberciti.biz/
3)Start with something you wanted to accomplish, for example, long time back i want to read one of my CHM format file in Linux which is by default not supported so I did a lot of googling. When
I got as far as I could, I would then ask people who knew more.
I think that's one way to start--find something specific you want to
accomplish and figure out how to do it. Usually, in the course of doing
it, you'll learn additional things that will help you with your next
issue.
4)Learn about other distro's which will improve your cross OS knowledge best place to learn is http://www.distrowatch.org. Just downloading distros and dual booting to them.
5)Always update your self with latest technologies in linux
these are my personal experiences which I learn, please let me know your way of troubleshooting.
Logical Volume Manager (LVM) in Redhat linux
4 comments 4/23/2009 01:09:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
Configuring LVM.. Please watch full video and comment on it so that we can currect our mistakes..
We like Feedback from you.. please comment on the video... Your comments are valuable to us to improve our Service.
The following video shows how to configure LVM sit and relax and see the video..
Unconfiguring LVM:In this video you will see how to unconfigure the LVM step by step..
Please browse our site for other hot topics such as Linux interview questions.. Practical implementations of many Admin activities..
Soft link Vs Hard link in Linux/*NIX
0 comments 4/23/2009 12:28:00 AM Posted by Surendra Kumar AnneGuest post by Sasi..
Soft Link
- Soft or symbolic is more of a short cut to the original file....if you delete the original the shortcut fails and if you only delete the short cut nothing happens to the original.
- A 'soft link' is a symbolic link to another file either on the same file system or a different file system. A 'soft link' may span file systems while a 'hard link' must point to a file on the same file system.
- A soft link (or symbolic link) is just a way of accessing files (or directories) without moving them. You just have to associate the path of the file with a special type of file (a link) which will lead you directly to it. It is called soft by comparison to a hard link which has different properties.
- A soft link is basically a file that contains the absolute path of the file it is pointing to. The file system tools simply know to follow the link in the file. This allows us to link across the system
hard link is more of mirror copy....does something to file1 and it appears in file 2
deleting one still keeps the other ok
Difference between hard link and soft link
Hard links share the same inode. Soft links do not.
Hard links can't cross file systems. Soft links do
In Linux, as in commercial Unix systems, the 'ln' command is used to create a symbolic link in file systems. A 'hard link' is a link pointing directly to a specific inode on the same file system.
An example of a partial 'ls -al' listing of a single line from a /dev directory on a Linux system which illustrates the appearance of a symlinked file follows:
lrwxrwxrwx 1 root root 3 Jan 13 22:05 cdrom -> hdc
In this example, the /dev/cdrom device is symlinked to the /dev/hdc device making them effectively one and the same though with different names. The leading 'l' in the 'lrwxrwxrwx' permissions listing indicates that the listing is a symbolic link. [JMH]
A hard link basically assigns another physical pointer to the same piece of data. This creates a limitation as it requires that the data be on the same logical disk as the link pointers location is designated by the inode of the data.
This is first guest post on my blog,Author of this post is having 4 years extnsive knowledge on most of the *NIX flavors you can reach him @ Sasikanth Padigala (spadigala@gmail.com)
Linux Interview questions:Experienced
0 comments 4/09/2009 01:19:00 AM Posted by Surendra Kumar AnneLabels: INTERVIEWS
why we required CHROOT package? can you explain it?
What is the location for DHCP server default leased configs file?
what is the command and syntax to check DNS server named.conf file errors?
What is the command and syntax to check DNS server zone files config errors?
How do you update DNS zone file entries with out restarting named demon?
What are the services/demons will restart when you restart NFS service?
how do you update NFS sharing details with out restarting NFS server?
What are the advantages of NIS?
Can you explain me about LVM and how you configure LVM?
What is the difference between LVM1 and LVM2?
What is Amanda server and where is it used?
Can you explain me corntab?
How to resize LVM?
Can you explain me about RAID5?
How many RAID devices are there in RHEL5 by default?
Min how many Raid devices will participate in RAID5?
How do you do Kernel patching and what is the command?
Can you explain me about in details how you do kernel recompilation?
Can you explain what is the use fo access file in sendmail and what is its location?
Can you explain me what is the advantage of local-hosts file and virtusertable in sendmail?
How you will specify static IP's in DHCP server?
how do you update NIS users with out restarting the NIS server?
What is the partation no for LVM?
What is the partation no for RAID?
What is the port no for DNS?
Can we change default port no for DNS? if yes, how?
How many RAID device we can create in RHEL4?
Can you explain me Disk quota in detail and configuration details?
How to increase RAID devices after it excied max limit?
Linux Interview Questions:Disk management
0 comments 4/02/2009 12:36:00 PM Posted by Surendra Kumar AnneLabels: Disk-Mgmt, INTERVIEWS
1) How to creat swap if you dont have free partation?
this is some what tricky question if you are new to Linux Administration
here is the command to create swap if you dont have free partation
before doing this you have switchoff the swap
swapoff -a
dd if=/dev/zero of=/root/swapfile bs=1k count=1024
swapon filename
2)How to see swap details?
cat /proc/swap
free
3)How to see/get info about RAM in ur system
free
cat /proc/meminfo
4)What is the difference between ext2 and ext3
I)ext3=ext2+journaling
"journaling" is an add-on to a filesystem that records changes as they are made.
II)ext2 files system is fast
III)less disk writes
IV)ext2 file system in less stable/secure
V)ext2 file system required to run fsck command if the system get crashed
5)How to convert ext2 file system to ext3?
tune2fs -j /dev/hda1
6)How convert ext3 file system to ext2
tune2fs -O^has-journal /dev/hda1
7)What is default block/chunk size for PV
4MB
8)what is the command to update the diskquota on file system
mount -o remount,rw /home
9)What is the partation type number for swap,RAID,LVM?
82(swap),fd(RAID),8e(LVM)
10)What is the default block site for ext2,ext3,LVM,RAID?
11)What is the difference between LVM1 and LVM2?
12)What is difference between RAID0,1,5?
Linux Interview Questions:Basic
0 comments 4/02/2009 01:48:00 AM Posted by Surendra Kumar AnneLabels: INTERVIEWS
2)What’s the command to find out today’s date? - date
6)What’s the command to find out users on the system? - who/users
11)How do you search for a string inside a directory? - grep string *
16)How do you find out about all running processes? - ps -ag
21)How do you do number comparison in shell scripts? - -eq, -ne, -lt, -le, -gt, -ge
26)How do you write a for loop in shell? - for {variable name} in {list} do {statement} done
31)How does getopts command work? - The parameters to your script can be passed as -n 15 -x 20.Inside the script, you can iterate through the getopts array as while getopts n:x option, and the variable $option contains the value of the entered option.