find / -name *.rpm -exec chmod 755“ – find all files and folders with names ending in '.rpm' and modify their access permissions.find /usr/bin -type f -mtime -10 – finds all files in ‘/usr/bin’ that were created or modified in the previous 10 days.find /usr/bin -type f -atime +100 – locate all files in ‘/usr/bin’ that have been accessed in the previous 100 days.find /home/user1 -name '*.bin’ – locates all files and folders with names that finish in ‘.find / -user user1 – locate files and directories associated with user user1.find / -name file1 – locate files and folders called file1.0712250000 -touch – change the date and time when the file was created if the file is missing, create a new file with the supplied date and time (YYMMDDhhmm).To build a “hard” (physical) link to a file or directory, use ln file1 lnk1.Build a symbolic link to a file or directory using ln -s file1 lnk1*.cp -a dir1 dir2 – move directory dir1 to directory dir2.– copy the contents of directory dir1 into the current directory. – copy all files in the dir directory to the current directory cp file1 file2 – copy file1 to file2 cp.mv dir1 new_dir – rename or move a file or directory.rm -rf dir1 dir2 – recursively remove the two folders and their contents.rm -rf dir1 – recursively remove the directory ‘dir1’ and all of its contents.rmdir dir1 – removes the directory ‘dir1’.mkdir -p /tmp/dir1/dir2 – creates a directory called ‘dir2’, as well as any intermediary directories (‘dir1’) that do not already exist.mkdir dir1 dir2 – make two directories at once.mkdir dir1 – make a directory called ‘dir1’.tree or lstree – displays the file and directory tree, beginning at the root (/).ls ** – display files and directories that have numerals in their titles.In the current directory, type ls -a to show hidden files and directories.ls -l – displays a comprehensive picture of the current directory’s files and directories.ls -F – demonstrates the contents of the current directory, with type symbols attached to the names.ls – displays the contents of the current directory.cd – return to the directory we were in before moving to the current directory.cd user – navigate to the user's home directory. – go over to the directory two levels above. cd /home – navigate to the directory '/home.'.To restart the system, use shutdown -r now or reboot -to.shutdown -c is used to terminate a planned computer shutdown.shutdown -h hours:minutes & – schedule system shutdown.shutdown -h now – terminates the system.date 041217002007.00* – configures the system date and time MMDDCHmmHmmYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY (MonthDayHhMinutesMinutesYear.Seconds).cal 2007 – shows the calendar table for 2007.lsusb -tv – demonstrates USB devices in a tree view.lspci -tv – displays the PCI devices in a tree format.cat /proc/mounts – shows a list of mounted file systems./proc/net/dev/cat – display network interfaces and their statistics./proc/version – exhibits the kernel version.Check memory utilization using cat /proc/meminfo.cat /proc/interrupts – display interrupts.cat /proc/cpuinfo – reveals CPU information.cat /proc/user beancounters – displays beancounter information (only on VPS).hdparm -tT /dev/sda – evaluate the read performance of the hard drive.hdparm -i /dev/hda – exhibit hard drive characteristics.dmidecode -q – display hardware system components (SMBIOS / DMI).uname -r – shows the kernel version that was utilized.arch or uname -m – displays your computer’s architecture.Commands in Linux Information about the System
0 Comments
Leave a Reply. |