Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 07. Unix File and Directory Management

Chapter 07. Unix File and Directory Management

CommandDescriptionCommandDescription
aproposSearch the whatis database for files containing specific strings.mkdirMake a directory.
bdflushKernel daemon that saves dirty buffers in memory to the disk.mknodMake a block or character special file.
cdChange the current directory. With no arguments "cd" changes to the users home directory.mktempMake temporary filename.
chmodchmod <specification> <filename> - Effect: Change the file permissions.mvMove or rename a file. Syntax: mv <source> <destination> Ex: mv filename directoryname/newfilename
chownchown <owner1> <filename> Effect: Change ownership of a file to owner1.pathchkCheck whether filenames are valid or portable.
chgrpchgrp <group1> <filename> Effect: Change group.pwdPrint or list the working directory with full path (present working directory).
cksumPerform a checksum and count bytes in a file.rmEx: "rm .*" - Effect: Delete system files (Remove files) –i is interactive option.
cpcp <source> <destination> Copy a file from one location to another.rmdirrmdir <directory> - Remove a directory. The directory must be empty.
ddConvert and copy a file formatting according to the options. Disk or data duplication.slocateProvides a secure way to index files and search for them. It builds a database of files on the system.
dirList directory contents.stat(1u)Used to print out inode information on a file.
dircolorsSet colors up for ls.sumChecksum and count the blocks in a file.
fileDetermines file type. Also can tell type of library (a.out or ELF).testCheck file types and compare values.
findEx: find $Home –name readme Print search for readme starting at home and output full path.touchChange file timestamps to the current time. Make the file if it doesn't exist.
installCopy multiple files and set attributes.updateKernel daemon to flush dirty buffers back to disk.
lnMake links between files.vdirList directory contents.
locateFile locating program that uses the slocate database.whatisSearch the whatis database for complete words.
losetupLoopback device setup.wherisLocate the binary, source and man page files for a command.
lsList files. Option -a, lists all.whichShow full path of commands where given commands reside.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial