Administration REDHAT Technocité
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
-40%
Le deal à ne pas rater :
Tefal Ingenio Emotion – Batterie de cuisine 10 pièces (induction, ...
59.99 € 99.99 €
Voir le deal

Liste de commandes à connaitre

Aller en bas

Liste de commandes à connaitre Empty Liste de commandes à connaitre

Message  ness Lun 28 Jan - 1:31

System information
arch show architecture of machine(1)
uname -m show architecture of machine(2)
uname -r show used kernel version
dmidecode -q show hardware system components - (SMBIOS / DMI)
hdparm -i /dev/hda displays the characteristics of a hard-disk
hdparm -tT /dev/sda perform test reading on a hard-disk
cat /proc/cpuinfo show information CPU info
cat /proc/interrupts show interrupts
cat /proc/meminfo verify memory use
cat /proc/swaps show file(s) swap
cat /proc/version show version of the kernel
cat /proc/net/dev show network adpters and statistics
cat /proc/mounts show mounted file system(s)
lspci -tv display PCI devices
lsusb -tv show USB devices
date show system date
cal 2007 show the timetable of 2007
date 041217002007.00 set date and time - MonthDayhoursMinutesYear.Seconds
clock -w save date changes on BIOS

Shutdown (Restart of a system and Logout )
shutdown -h now shutdown system(1)
init 0 shutdown system(2)
telinit 0 shutdown system(3)
shutdown -h hours:minutes & planned shutdown of the system
shutdown -c cancel a planned shutdown of the system
shutdown -r now reboot(1)
reboot reboot(2)
logout leaving session

Files and Directory
cd /home enter to directory '/ home'
cd .. go back one level
cd ../.. go back two levels
cd go to home directory
cd ~user1 go to home directory
cd - go to previous directory
pwd show the path of work directory
ls view files of directory
ls -F view files of directory
ls -l show details of files and directory
ls -a show hidden files
ls *[0-9]* show files and directory containing numbers
tree show files and directories in a tree starting from root(1)
lstree show files and directories in a tree starting from root(2)
mkdir dir1 create a directory called 'dir1'
mkdir dir1 dir2 create two directories simultaneously
mkdir -p /tmp/dir1/dir2 create a directory tree
rm -f file1 delete file called 'file1'
rmdir dir1 delete directory called 'dir1'
rm -rf dir1 remove a directory called 'dir1' and contents recursively
rm -rf dir1 dir2 remove two directories and their contents recursively
mv dir1 new_dir rename / move a file or directory
cp file1 file2 copying a file
cp dir/* . copy all files of a directory within the current work directory
cp -a /tmp/dir1 . copy a directory within the current work directory
cp -a dir1 dir2 copy a directory
ln -s file1 lnk1 create a symbolic link to file or directory
ln file1 lnk1 create a physical link to file or directory
touch -t 0712250000 file1 modify timestamp of a file or directory - (YYMMDDhhmm)
file file1 outputs the mime type of the file as text
iconv -l lists known encodings
iconv -f fromEncoding -t toEncoding inputFile > outputFile creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding.
find . -maxdepth 1 -name \*.jpg -print -exec convert "{}" -resize 80x60 "thumbs/{}" \; batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick)

File search
find / -name file1 search file and directory into root filesystem from '/'
find / -user user1 search files and directories belonging to 'user1'
find /home/user1 -name \*.bin search files with '. bin' extension within directory '/ home/user1'
find /usr/bin -type f -atime +100 search binary files are not used in the last 100 days
find /usr/bin -type f -mtime -10 search files created or changed within 10 days
find / -name \*.rpm -exec chmod 755 '{}' \; search files with '.rpm' extension and modify permits
find / -xdev -name \*.rpm search files with '.rpm' extension ignoring removable partitions as cdrom, pen-drive, etc.…
locate \*.ps find files with the '.ps' extension - first run 'updatedb' command
whereis halt show location of a binary file, source or man
which halt show full path to a binary / executable

Mounting a Filesystem
mount /dev/hda2 /mnt/hda2 mount disk called hda2 - verify existence of the directory '/ mnt/hda2'
umount /dev/hda2 unmount disk called hda2 - exit from mount point '/ mnt/hda2' first
fuser -km /mnt/hda2 force umount when the device is busy
umount -n /mnt/hda2 run umount without writing the file /etc/mtab - useful when the file is read-only or the hard disk is full
mount /dev/fd0 /mnt/floppy mount a floppy disk
mount /dev/cdrom /mnt/cdrom mount a cdrom / dvdrom
mount /dev/hdc /mnt/cdrecorder mount a cdrw / dvdrom
mount /dev/hdb /mnt/cdrecorder mount a cdrw / dvdrom
mount -o loop file.iso /mnt/cdrom mount a file or iso image
mount -t vfat /dev/hda5 /mnt/hda5 mount a Windows FAT32 file system
mount /dev/sda1 /mnt/usbdisk mount a usb pen-drive or flash-drive
mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share mount a windows network share
ness
ness

Messages : 56
Date d'inscription : 05/11/2007

Revenir en haut Aller en bas

Revenir en haut

- Sujets similaires

 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser