KingPin's Forum
 
K.P.s.N. Register vbBux / KPs Mall Bugs Blogs FAQ Search Today's Posts Mark Forums Read Donate
Go Back   KingPin's Forum > KP's Network Forum > Tutorials & Stuff!
Reload this Page Linux File : Management and Viewing
 


Tutorials & Stuff! This is a discussion on Linux File : Management and Viewing in the Tutorials & Stuff!;
Description: Linux File Management and Viewing File and Directory management apropos Search the whatis database for files containing specific strings. bdflush ...

Reply
 
LinkBack Thread Tools
Linux File : Management and Viewing
(#1 (permalink))
Old
KingPin's Avatar
KingPin is Offline
Da Boss!
KingPin has disabled reputation
 

My Mood:
 
Posts: 7,034
Thanks: 20
Thanked 17 Times in 15 Posts
Blog Entries: 22
Join Date: Apr 2004
Location: Brooklyn, NY
Linux File : Management and Viewing - July 16th, 2004

Linux File Management and Viewing
File and Directory management
apropos Search the whatis database for files containing specific strings.
bdflush Kernel daemon that saves dirty buffers in memory to the disk.
cd Change the current directory. With no arguments "cd" changes to the users home directory.
chmod chmod - Effect: Change the file permissions.
Ex: chmod 751 myfile Effect: change the file permission to rwx for owner, re for group
Ex: chmod go=+r myfile Effect: Add read permission for the owner and the group
character meanings u-user, g-group, o-other, + add permission, - remove, r-read, w-write,x-exe
Ex: chmod a +rwx myfile Effect: Allow all users to read, write or execute myfile
Ex: chmod go -r myfile Effect: Remove read permission from the group and others
chmod +s myfile - Setuid bit on the file which allows the program to run with user or group privileges of the file.
chmod {a,u,g,o}{+,-}{r,w,x} (filenames) - The syntax of the chmod command.
chown chown Effect: Change ownership of a file to owner1.
chgrp chgrp Effect: Change group.
cksum Perform a checksum and count bytes in a file.
cp cp Copy a file from one location to another.
dd Convert and copy a file formatting according to the options. Disk or data duplication.
dir List directory contents.
dircolors Set colors up for ls.
file Determines file type. Also can tell type of library (a.out or ELF).
find Ex: find $Home ?name readme Print search for readme starting at home and output full path.
How to find files quickly using the find command:
Ex: find ~ -name report3 ?print

* "~" = Search starting at the home directory and proceed through all its subdirectories
* "-name report3" = Search for a file named report3
* "-print" = Output the full path to that file

install Copy multiple files and set attributes.
ln Make links between files.
locate File locating program that uses the slocate database.
losetup Loopback device setup.
ls List files. Option -a, lists all, see man page "man ls"
Ex: "ls Docum Projects/Linux" - The contents of the directories Docum and Projects/Linux are listed.
To list the contents of every subdirectory using the ls command:

1. Change to your home directory.
2. Type: ls -R

mkdir Make a directory.
mknod Make a block or character special file.
mktemp Make temporary filename.
mv Move or rename a file. Syntax: mv Ex: mv filename directoryname/newfilename
pathchk Check whether filenames are valid or portable.
pwd Print or list the working directory with full path (present working directory).
rm Ex: "rm .*" - Effect: Delete system files (Remove files) ?i is interactive option.
rmdir rmdir - Remove a directory. The directory must be empty.
slocate Provides a secure way to index files and search for them. It builds a database of files on the system.
stat(1u) Used to print out inode information on a file.
sum Checksum and count the blocks in a file.
test Check file types and compare values.
touch Change file timestamps to the current time. Make the file if it doesn't exist.
update Kernel daemon to flush dirty buffers back to disk.
vdir List directory contents.
whatis Search the whatis database for complete words.
wheris Locate the binary, source and man page files for a command.
which Show full path of commands where given commands reside.

File viewing and editing
ed Editor
emacs Full screen editor.
gitview A hexadecimal or ASC file viewer.
head head linuxdoc.txt - Look at the first 10 lines of linuxdoc.txt.
jed Editor
joe Editor
less q-mandatory to exit, Used to view files.
more b-back q-quit h-help, Used to view files.
pico Simple text editor.
tail tail linuxdoc.txt - Look at the last 10 lines of linuxdoc.txt.
vi Editor with a command mode and text mode. Starts in command mode.
File compression, backing up and restoring
ar Create modify and extract from archives.
bunzip2 Newer file decompression program.
bzcat Decompress files to stdout.
bzip2 Newer file compression program.
bzip2recover Recovers data from damaged bzip2 files.
compress Compress data.
cpio Can store files on tapes. to/from archives.
dump Reads the filesystem directly.
gunzip unzip - unzip a gz file.
gzexe Compress executable files in place.
gzip gzip - zip a file to a gz file.
mt Control magnetic tape drive operation.
tar Can store files on tapes.
Usage: tar cvf - Archive copy groups of files
Ex: tar /dev/fdo temp Effect: Copy temp to drive A:
uncompress Expand data.
unzip unzip - unzip a zip file. Files ending in ".gz" or ".zip" are compressed.
zcat Used to restore compressed files.
zcmp Compare compressed files.
zdiff Compare compressed files.
zforce Force a .gz extension on all gzip files.
zgrep Search possibly compressed files for a regular expression.
zmore File filter for crt viewing of compressed text.
znew Recompress .z files to .gz files.
zip zip - make a zip file.
Extra control and piping for files and other outputs
basename Strip directory and suffix information from filenames.
cat Ex: cat < filename --- Effect: put keyboard input into the file. CTRL-D to exit (end).
cmp Compare two files.
colrm Remove columns from a file.
column Columnate lists.
comm Ex: comm file1 file2 --- Effect compare the contents of file1 and file2 produces 3 columns of output. Lines in the first file, lines in second file, lines in both files.
csplit Split a file into sections determined by context lines.
cut Remove sections from each line of files.
diff Show the differences between files. Ex: diff file1 file2
diff3 Find differences between 3 files.
dirname Strip the non-directory suffix from a filename.
echo Display a line of text.
egrep Similar to grep -E, compatible with UNIX egrep.
expand Convert tabs to spaces.
expr Evaluate expressions.
false Do nothing. Exit with a status indicating failure.
fgrep Same as grep -F.
fold Wrap each input line to fit in specified width.
join Join lines of two files in a common field.
grep grep pattern filename.
Ex: grep " R " --- Effect: Search for R with a space on each side
Ex: ls ?a |grep R --- Effect: List all files with an R in them or their info listing.
hexdump asc, decimal, hex, octal dump.
logname Print user's login name.
look Display lines beginning with a given string.
mkfifo Create named pipes with the given names.
nl Write each file to standard output with line numbers added.
od Dump files in octal and other formats.
patch Apply a diff file to an original.
paste Combines from 2 or more files. Ex: paste file1 file 2
printf Print and format data.
rev Reverses lines in a file.
script Make a typescript of a terminal session.
sdiff Find differences between 2 files and merge interactively.
sed A stream editor. Used to perform transformations on an input stream.
sleep Delay for a specified amount ot time.
sort Sort a file alphabetically.
split Split a file into pieces.
strings Print the strings of printable characters in files.
tac Concatenate and print files in reverse.
tee Read from standard input and write to standard output and files.
tr Translate or delete characters.
true Do nothing. Exit with a status indicating success.
tsort Perform topological sort.
ul Do underlining.
unexpand Convert tabs to spaces.
uniq Remove duplicate lines from a sorted file.
uudecode Used to transform files encoded by uuencode into their original form.
uuencode Encode a binary file to be sent over a medium that doesn't support non-ASC data.
wc Count lines, words, characters in a file. Ex: wc filename.
xargs Build and execute command lines from standard input.
yes Output the string "y" until killed.

 
Reply With Quote
Revenue Shared Ads
Linux File : Management and Viewing
Revenue Shared Ads
Reply

Bookmarks

Tags
linux, file, management, viewing

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Rupees Per Thread View: 1.00
Rupees Per Thread: 15.00
Rupees Per Post: 5.00
Forum Jump



These are the 100 most searched terms
Search Cloud
_backup.rc antrix wow antrix wow server autocad 2007 keygen best google gadgets best wow character bt map devil may cry 4 crack enchanting leveling erika bella fuckteam fuckteam 5 georgina lempin gigistar gigistar topless kpsden kpsforum leatherworking guide leveling enchanting mangos custom vendors mangos item id mangos linux mangos server mangos spell id mangos wotlk mature creampie milena velba no rest for the ass object id wow phoenix marie this is sparta vipersdenforums voyage century bot windows activation workaround windows xp lite wotlk alpha private server wotlk private server wotlk server wotlk wiki wow leatherworking guide wow mount locations wow object id wow object id list wow object id's wow object ids wow objects id www.adobeflashplayer www.adobeflashplayer.com www.kpsforum.com xbox 360 mmorpg ... powered by Simple Search Cloud
Powered by vBulletin® Version 3.8.0 Beta 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright 2004-2009 KPsN


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82