Linux Quickref Linux Version 2.0.2 October 2003 Usermount Executes Graphical Utility for Contents Mounting and Unmounting Topic Page Filesystems

Linux Quickref Linux Version 2.0.2 October 2003 Usermount Executes Graphical Utility for Contents Mounting and Unmounting Topic Page Filesystems

Linux QuickRef Linux version 2.0.2 October 2003 usermount Executes graphical utility for Contents mounting and unmounting Topic Page filesystems. Mounting Filesystems...............................................1 Finding Files and Text Within Files..........................1 exportfs -ra Re-apply NFS export directives as Move Copy, Delete and View Files...........................1-2 listed in /etc/exports. Meta Characters.......................................................2 Regular Expressions................................................2 Finding Files and Text Within Files File Permissions.......................................................2 Symbolic Links..........................................................2-3 find / -name filename Starting at the / directory, find the chmod Modes...........................................................3 file “filename”. User Administration..................................................3 Printing.....................................................................3 find / -name Starting at the / directory, find the man Pages...............................................................3-4 “*string*” file containing the word “string”. Shutdown & Reboot..................................................4 Installing Software....................................................4 find / -perm +4000 Find existing files on the system Modules....................................................................4 -user root -print that have their SUID root Configuration Files...................................................4-5 permissions set. System Services.......................................................5 Crontab.....................................................................5 find / -perm +2000 Find existing files on the system Networking................................................................5 -group <group> that have their SGID permissions Archiving...................................................................5 -print set. Bash Shell................................................................5-6 Vim / Vi Editor...........................................................6 find / -nouser -print Find existing files on the system X Windows................................................................6 that don't belong to any user listed ssh and GnuPG........................................................6 in /etc/passwd. Tips & Tricks.............................................................6-7 GNU/Linux Links.......................................................7-8 info Lists the commands and utilities installed with brief description as to what they are used for, or do. Unless noted, all commands are to be entered on one line (use the " \" continuation character if needed). locate filename Locate a file “filename” using the updatedb database (see next). Mounting Filesystems updatedb Create or update the database mount -t msdos Mount an MS-DOS formatted used by the locate command. /dev/fd0H1440 floppy disk at /mnt/floppy. /mnt/floppy apropos subject List man pages for “subject”, searches the whatis database for mount -t iso9660 Mount a CD-ROM drive at strings. /dev/cdrom /mnt/cdrom. /mnt/cdrom whatis Search the whatis database for complete words. mount -t vfat Mount a VFAT hard drive partition /dev/hda1 /mnt/win hda1 at /mnt/win. makewhatis Create or update the database used by whatis and apropos mount -t smbfs Mount a SMB share located at commands. //system/share/ //system/share at /mnt/samba. /mnt/samba which filename Show the subdirectory containing the executable file “filename”. mount -t iso9660 Mount an ISO image as a -o loop image.iso filesystem at /mnt/iso using the grep –r textstring Starting with the directory “/dir”, /mnt/iso loopback device. /dir recursively find and list all files containing the string “textstring”. mount -t ext2 Mount a Linux filesystem /dev/pda formatted SyQuest EZ-Drive Move Copy, Delete and View Files /mnt/ezdrive cartridge at /mnt/ezdrive. mv filename Move the file “filename” to the umount /mnt/cdrom Unmount the CD-ROM. /home/dirname directory /home/dirname. cp filename Copy the file “filename” to the /home/dirname directory /home/dirname. Linux QuickRef 1 rm name Remove the file or directory + Match one or more repeated “name”. occurrences of the previous character. rm -rf dir Remove the entire directory “dir”, forcing the removal of included ? Match zero or one repeated files and subdirectories occurrences of the previous recursively as well. character. ls -l List files in current directory in ^ Matches an expression that long format. follows it at the beginning of a line. Needs double quotes when used ls -F List files in current directory and with grep. indicate the file types. $ Matches the regular expression ls -laC List all files in current directory in that precedes it at the end of a long format and display in line. Needs single quotes when columns. used with grep. cat filename Display the file “filename”. [a-z0-9] Single-character range (“a” through “z” or “0” through “0”). more filename Display the file “filename” one page at a time. Advance pages by [abc123] Single-character choice (“a”, “b”, pressing the spacebar. “c”, “1”, “2” or “3”). less filename Display the file “filename” one [^x,y,z] Single-character choice, but not page at a time. Advance pages by the characters “x”, “y” or “z”. pressing the spacebar, backup with the “b” key. (abc) Grouped characters “abc”. zless filename Same as above, only used with \ Used to escape regular files compressed with gzip. expression characters such as +, *, and ^ to include the literal head filename Display the first 10 lines of the file character in a match. “filename”. File Permissions head -25 filename Display the first 25 lines of the file “filename”. User Group Others d r w x r w x r w x tail filename Display the last 10 lines of the file “filename”. File Type Execute tail -25 filename Display the last 25 lines of the file “filename”. -=file Write d=directory Meta Characters l=link Read b/c=block/char device * Multiple-character wildcard. ? Single-character wildcard. When the command “ls –l” is used, a list of file names is displayed. The first column in this list details the file type and the [a-z0-9] Single-character character range permissions applied to the file. If a permission is denied for a set, (“a” through “z” or “0” through “0”). User (Owner), Group and Others, it is represented by a –. [abc123] Single-character choice (“a”, “b”, File permissions are altered by giving the “c”, “1”, “2” or “3”). “chmod” command and the appropriate octal Read = 4 code for each set. Ex.: [!xyz] Single-character choice, but as Write = 2 chmod 764 filename not the characters “x”, “y” or “z”. Execute = 1 will make the file “filename” r-w-x for the user, Regular Expressions r-w for the group, and r for any others. Match a single character (functionally equivalent to how the Symbolic Links '?' character works in glob symlink -r / List all the symbolic links on the expansions). system. * Match zero or more repeated symlink -rv / | fgrep Find all symbolic links that are occurrences of the previous "dangling" "dangling", excluding other character. mounted filesystems. ln -l linkname Display the link-path for a link. Linux QuickRef 2 find . -type l Find all symbolic links and show lpr Print a file. -exec ls -l {} \; what they point to. lprm Remove jobs from print queue. chmod Modes lprm -a Remove all jobs from the print chmod 600 Read and write permissions for queue for the logged user. user only. lprm -a all Remove all jobs for all users from chmod 700 Read, write and execute the print queue (run as root). permissions for user only. lpc Printer control tool. chmod 755 Full permission for user, read and execute for group and others. printtool Run the X Windows printer setup utility. chmod 711 Full permission for user, execute for group and others. ma n Pages chmod 444 Read permissions only for man -k word Display man pages containing everybody. “word”. chmod +x filename Make the file “filename” man subject | Print the man page “subject” as executable for everybody; user, col -b | lpr plain text. group and others. man -t subject | Print the man page “subject” as chmod go-w filename Revoke write permissions for col -b | lpr Postscript. group and others on the file “filename”. Manual pages are organized into topics: /usr/man/man1 Commands - Commands you run from chmod ug=r filename Set the permissions to readable within a shell. only for user and group on the file “filename”. /usr/man/man2 System Calls - Documentation for kernel functions. chmod a=r,u+w Set the permissions to readable filename only for all (everybody) and add /usr/man/man3 Library Calls - Manual pages for libc write-able for user on the file functions. “filename”. /usr/man/man4 Special Files - Information about files in User Administration the /dev/ directory. useradd username Create a new user account named /usr/man/man5 File Formats - Details of formats for / “username”. etc/passwd and other files. passwd username Assign a password to “username”. /usr/man/man6 Games. su -or- su - Switch user to root, or root and to /usr/man/man7 Macro Packages - Descriptions of the Linux include root’s set environment file system, manual pages, and others. (must know root password to use). /usr/man/man8 System Management - Manual pages for su -c "command" Run “command” (include any root operator utilities. options within the quotes) as root. /usr/man/man9 Kernel Routines - Documentation on Linux su username Switch

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us