File search
Find/-name file1 from ‘/’ began to enter the root file system to search for files and directories
Find/-user User1 searches files and directories belonging to user ‘user1’
Search in directory ‘/home/user1’/\*.bin with ‘.bin’ the end of the file
/+100 searches during the past 100 days have not been used to perform file
/-10 search within 10 days of being created or modified files
find / -name \*.rpm -exec chmod 755 ‘{}’ \; Search for files ending in ‘.rpm’ and define its permissions
Find/-\*.rpm search for files ending with ‘.rpm’, ignore the optical drive, McNair disk and other removable devices
Locate \*.PS look for files ending in ‘.ps’-run ‘updatedb’ command
Whereis display a binary file, source code, or halt man locations
Display a binary file which halt or full path to the executable file
Mount a file system
//Hda2 mount ‘/mnt/hda2’ a disk called hda2-determine directory already exists
/Hda2 uninstall a disk called hda2-exit from the mount point ‘/mnt/hda2’
/MNT/hda2 when equipment busy forced uninstall
/MNT/hda2 run the uninstall operation is not written to the/etc/MTAB file when the file is read-only or when disk filled with very useful
//Floppy mount a floppy disk
//Cdrom mount a CDROM or DVDROM
//CDRecorder mount a CDRW/DVDROM
//CDRecorder mount a CDRW/DVDROM
Loop file./cdrom to mount a file or ISO image file
//Hda5 a Windows FAT32 file system is mounted
//USBDisk Czech disk or mount a USB Flash memory device
Username=user,password=pass//WinClient//share mount a Windows network share
Disk space
Display list of mounted partitions
|More size sorts files and directories
Estimation of Dir1 directory ‘dir1’ already used disk space ‘
du -sk * | Based on size displays the size of the files and directories
rpm -q -a –qf ‘%10{SIZE}t%{NAME}n’ | 1N based on size displays the used space by installed RPM package (Fedora, RedHat systems)
dpkg-query -W -f=’${Installed-Size;10}t${Package}n’ | 1N according to size displays the used space by installed deb package (Ubuntu, Debian systems)
Back to top index ^
User and groups
Groupadd group_name to create a new user group
Groupdel group_name to delete a user group
New_group_name old_group_name renames a user group
“Name Surname”-//bin/bash User1 creates a belong to the “admin” users in the users group
Useradd User1 creates a new user
Delete a user User1 (‘-r’ excluded from the main directory)
“User FTP”-//bin/nologin User1, modify user attributes
Passwd change password
Passwd User1, modify a user’s password (only allow root execution)
2005-12-31 set User1 password expiration of term
Pwck check ‘/etc/passwd’ file format and grammar correction, and existing users
Grpck checks the ‘/etc/passwd’ file format and grammatical fixes, and existing groups
Newgrp group_name landing into a new group to change the newly created files default group
Back to top index ^
Files-use the “+” permissions are set, use the “-” used to cancel
Show permissions
ls /tmp | -W$COLUMNS display Terminal is divided into 5 columns
Chmod Ugo+rwx directory1 Setup directory owner (u), group (g) and others (o) to read (r), write (w) and execute (x) permissions
Chmod go-rwx directory1 delete a group (g) and others (o) to read and write to the directory Execute permissions
Chown User1 File1 to change owner of a file property
User1 directory1 change a directory and change all properties of all files in directory properties
Chgrp Group1 file1 changes file group
Chown user1:group1 File1 to change file owner and group attributes
Find/-+s to list all SUID control is used in a system file
Set chmod u+/file1 running a SUID binary file-the user has been given and the owner of the file the same permissions
Chmod u-/File1 to disable the SUID bit for a binary file
Chmod g+/public to set the SGID bit-similar to SUID a directory, but this is the directory
Disable a SGID directory chmod g-/public
Set STIKY bit for a file chmod o+/public-only allow legitimate owners to delete files
Chmod o-/public disable STIKY directory
Back to top index ^
The special attributes of the file-use the “+” permissions are set, use the “-” used to cancel
Chattr +a file1 only allowed to append the read and write files
Chattr +c File1, this file can be used by the kernel to automatically compress/extract
Chattr + d File1 to file system backup, dump the program will ignore this file
Chattr + I file1 set immutable files cannot be deleted, modified, renamed or linked
Chattr + s file1 allows a file to be deleted safely
Chattr + s file1 once your application is performing write operations on this file, the system immediately written to disk modified results
Chattr +u File1, if a file is deleted, the system will allow you to later restore the deleted file
Lsattr displays special properties
Back to top index ^
Packaged and compressed files
Bunzip2 file1.bz2 decompress a file called ‘file1.bz2’
Bzip2 file1 compress a file called ‘file1’
Gunzip file1.gz unzip a file called ‘file1.gz’
Gzip compression called file1 file ‘file1’
File1 maximum compression
RAR file1.rar test_file creates a package called ‘file1.rar’
RAR file1.rar file1 file2 Dir1 and a compression ‘file1’, list of ‘file2’ and ‘dir1’
RAR x file1.rar extract the RAR package
UnRAR x file1.rar extract the RAR package
Archive.tar file1 creates an uncompressed tarball
Archive.tar file1 file2 create a Dir1 contains the ‘file1’, ‘file2’ and ‘dir1’ profile
Archive.tar show package contents
Archive.tar releasing a package
Archive./tmp release tarball into/tmp directory
Archive.tar.bz2 create a Dir1 format of bzip2 compression package
Archive.tar.bz2 decompress a compressed in bzip2 format
Archive.tar.gz Dir1 create a gzip formatted compressed package
Archive.tar.gz unzip a gzip formatted compressed
Zip file1.zip file1 creates a zip format compression package
File1.zip file1 file2 Dir1 will compress several files and directories at the same time into a zip format compression package
Unzip file1.zip unzip a zip format compression package
Back to top index ^
RPM package-(Fedora, Redhat and similar systems)
Package.rpm install a RPM package
Install an RPM package ignoring dependencies–nodeeps package.rpm warning
Package.rpm updating an RPM package without changing its configuration file
Package.rpm updates make sure you have installed RPM packages
Package_name.rpm remove a RPM package
Shows all objects in the system have been installed RPM packages
rpm -qa | Grep httpd to display all names containing “httpd” RPM packages
Package_name Gets a special information package has been installed
“System Environment/Daemons” display a RPM package components
Package_name display provided by a RPM package already installed files list
Package_name displays a list of installed RPM packages provide configuration files
Package_name–whatrequires display a RPM package dependency list
Display a RPM package package_name–whatprovides the volume accounted for by
Package_name–scripts appear in the scripts that are executed during the installation/removal of l
Package_name–ChangeLog display a RPM package change history
/Etc/httpd/conf/httpd.conf confirmed to the files provided by a RPM package
Package. display of files provided by a RPM package not yet installed list
RPM–/cdrom/RPM-GPG-KEY import public key digital certificates
RPM–checksig package.RPM verify a RPM package integrity
Integrity of the GPG-pubkey sure you have installed all the RPM packages
Package_name check file size, permissions, type, owner, group, MD5 checks, and last modified time
Check all rpm packages installed in the system-use with caution
Leave a Reply