Thursday, January 28, 2016

Basic File Managemant (Part-2)



X.  Deleting files with rm
  • ·        You can remove or delete the specified files by using the rm command
  • ·        You must have write permission for the directory from which you want to remove the specified file
  • ·        You must use the rm command carefully if you are loffed in as root!
  • ·        Options to beused with rm command:

1.   -f: deletes write-protected files without prompting

2.   -i: asks the user before deleting files

3.   -r: Deletes files and directories recursively.


  • For example, data is cleared from/tmp, without prompting to user to delete eac.h file
       Syntax for this command is :

             $ rm –rf / tmp/*


Xi. Making Directories with mkdir

·                    You can make new directories by using the mkdir command.      The syntax to use the mkdir command is:

    Mkdir directory-names
·                 Options to be used with mkdi command:

1.   –p:Creates intervening parent directories if they don’t already exist

2.   –m: set the access permissions to mode

·        For example, to create a directory called mystuff in your home directory with permissions so that only you can write, but other users can read it, the syntax is:

           $ mkdir –m 755-/mystuff

·        To create a directory tree in /tmp using one command with three subdirectories called one, two and three, the syntax is:

           $ mkdir _p /tmp/one/two/three


Xii. Identifying Types of Files

·       

           The data in files is stored in different formats, such as executable programs and text files.

You can identify the type of a files by using the file command.  The syntax to use the file command is:

     $ file/bin/bash
/bin/bash: ELF 32-bit LSB executable, Intel80386, version 1,
Dynamically linked (uses shared libs), stripped

·        It is useful to find out whether a program is actually a script:

         $ file/usr/bin/zless
          /usr/bin/zless: Bourne shellscript text

·        If  file does not know about a specific format.  It can identify the format by using the following command:

       $ files/etc/passwd/etc/passwd: ASCII text


Xii. Changing Timestamps with touch

·        Changes the access and modification times of files

·        Creates files that do not already exist

·        Options:

1.   –a, change only the access time

2.   –m, change only the nodification time

3.   –t [YYYY] MMDDhhmm[.ss], set the timestamp of the file to the specified date and time.

4.   GNU touch has a –d option, which accepts times in a more flexible format.

·                                   For example, to change the time stamp on homework to  January 20 2001, 5:59p.m, the syntax is:

            $ touch –t 200101201759 homework
         Working with Linux supported file systems


NEXT-PART

Linux Disk Management



MAXIT INTERNET

BLOGGER

CD DVD RW

DELL

DOWNLOAD

FTP Server Linux

HACK

HARD DRIVE

HOW TO WORKIN

HARDWAER

INTERNET

INTERNET CAFE

LAPTOP

LENOVO

LINUX

Additional configuration for Samba Server (Part 2)  

BSNL/Airtel/Idea using Huawei E156G 3g Wireless USB Linux 5   

Basic File Extensions    CHANGING AN ACCOUNT EXPIRATION DATE   

Configure Linux as a Router   

Configure SAMBA Server (Part-1)   

Configure VNC server   

Configure Yum Server (Part-1)   

Configure yum server for Client machine (Part 3)   

Configuring Samba as a Standalone Server (Part 3)  

Connecting ftp Server with Anonymous User Part 5  

Create ftp account with Shared directory Part 3  

DHCP Server Configuration Part 2  

DHCP Server Configuration Part-1  

DHCP Server Configuration Part-3  

Enabling FTP Services in Yum Server (Part 5)  

FTP Server Configuration Part 1  

FTP Server How to Change In Primary DNS Server Part 2  

HTTP Client side configuration (Part 4)  

How to Vsftpd conf files Parameter Part 6   

LINUX FILE SYSTEM STRUCTURE  

Linux User Administrtion  

Linux as a Router configuration for Client Machine   

Linux client machine FileZilla FTP Client Part 4  

Local Yum Server (Part 2)  

Modifying Existing User Information  

Primary DNS Server Configuration Part-1  

Primary DNS Server Configuration Part-2    

Primary DNS Server Configuration Part-3  

Remove Linux From Your Pc Safely and restoring your MBR  

Sharing & Accessing Samba Share (Part 4)   

Speeding up your internet connection under Linux and Windows   

THE ROOT FILE SYSTEM   

VNC Server Configuration

LINUX LAB

Linux as a Router

MOTHERBOARD

Mobile

NETWORKING

REDHAT 5

REGISTRY EDTOR

RESET BIOS PASSWORD

SAMBA Server Linux

SERVER

SERVER CONFIG

SOFTWAER

VNC server Linux

Window 10

Window XP