Displaying posts categorized under

File Management

'tail' command

“tail” command – used to Print the last few lines of each FILE to standard output. Syntax : tail [options] filename [Source from Wikipedia]By default, tail will print the last 10 lines of its input to the standard output. With command line options the number of lines printed and the printing units (lines, blocks or [...]

File and Directory Commands

1.mkdir –make directories or folder# mkdir [dirname]–> creates specified directory 2.cd – change directory path# cd [dirname]–> switches into specified directory# cd .. –>moves one directory up# cd ../../ —> moves two directories up (and so on)# cd –> brings you to highest level of your home directory 3.rm – delete files and directories# rmdir [...]

Creating Archive Files (like tar.gz)

1. For creating Archive file use tar commandSyntax: tar -cf archivename filenames (seperated with space) Example :VIT:/home/antony# tar -cf model.tar sample.c sample2.c 2. For displaying contents of archive file VIT:/home/antony# tar -tvf model.tar -rw-r–r– antony/antony 54 2007-09-22 03:10 sample.c -rw-r–r– root/root 0 2007-09-22 03:12 sample2.c 3. For extracting files from archiveVIT:/home/antony# tar -xf model.tar