July 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

July 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Creating large empty files in Linux / UNIX

Creating large empty files in Linux / UNIX

To create large empty files in Linux or UNIX:

# dd if=/dev/zero of=filename bs=1024 count=desired

Example to create a 1GB file: dd if=/dev/zero of=file_1GB bs=1024 count=1000 /or/ dd if=/dev/zero of=file_1GB bs=4096 count=250 /or/ dd if=/dev/zero of=file_1GB bs=2048 count=500

Example to create a 2GB file:

dd if=/dev/zero […]

rsync

rsync examples from command line.

 

To copy all the files in /home/lokams/* of remote host to local directory /backup/home/lokams/ # rsync -e ssh -avz –delete –exclude dir/* –delete-excluded –stats user@remotehost:/home/lokams/ /backup/home/lokams/

To copy the directory /home/lokams of remote host to local directory /backup/home. Directory “lokams” will get created in /backup/home. # rsync -e ssh […]

My Loveable Linux Commands

My Loveable Linux Commands Command Description

apropos whatis Show commands pertinent to string See also threadsafe man -t ascii | ps2pdf – > asciipdf make a pdf of a manual page which command Show full path name of command time command See how long a command takes time cat Start stopwatch Ctrl-d to stop See […]

Find Command

Find Command

Some examples:

Find all files with 777 permissions: find . -type f -perm 777 -print

Find all files that are older than 14 days and ls: find . -type f -mtime +14 -exec ls -l {} \;

Find all your writable files and list them: find . -perm -0777 -type f -ls

Find […]

Limiting large requests in apache

Limiting large requests in apache Apache has several directives that allow you to limit the size of a request, this can also be useful for mitigating the effects of a denial of service attack.A good place to start is the LimitRequestBody directive. This directive is set to unlimited by default. If you are allowing file […]

Delay in SSH Login Prompt

Delay in SSH Login Prompt

You may came across this situation. At the time of logging in the shell prompt using SSH, – Connection will be taking a fraction of second – After/While entering the Password its taking more time to provide the shell prompt. To fix this issue: This is related to DNS. We […]

Linux Booting Process Sequence

Linux Booting Process Sequence

When the computer is switched on, it automatically invokes BIOS [a ROM chip embedded in the motherboard]. The BIOS will start the processor and perform a POST [power on self test] to check whether the connected device are ready to use and are working properly. Once the POST is completes BIOS […]

Recover Bad Superblock in Linux Filesystem

Recover Bad Superblock in Linux Filesystem

If you get a ¨Damaged Superblock¨ error message at filesystem (fsck) check in Linux Server, Usually fsck will not be able to repair the file system due to bad super block. In these situations, we can recover the damaged super block from the backup.

Solution: There are backups […]

Stop or Pause Process in Linux Server

Stop or Pause Process in Linux Server

ome times we may need to pause a particular process or service in Linux Servers.

We may need to stop a particular process without killing it for certain period of time and resume it again.

This can be done with KILL Command.

Most of us familiar with KILL […]

Disable first time password change in AIX

Disable first time password change in AIX

 

How to disable first time password change in AIX?

Usually in AIX, if you change the password of a user, it will prompt the user to change his password when he login first time.

To disable this first time password change in AIX Server, Clear the ADMCHG […]