Danh mục

Suse Linux 9.3 For Dummies- P9

Số trang: 15      Loại file: pdf      Dung lượng: 520.00 KB      Lượt xem: 27      Lượt tải: 0    
Hoai.2512

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Suse Linux 9.3 For Dummies- P9:This part is all about getting you started on your wayto a lasting relationship with SUSE Linux. Before youcan begin your SUSE Linux experience, I spend a chapterexplaining what SUSE Linux is and what you can do withSUSE Linux (pretty much anything you can do with a PCthat runs Windows).
Nội dung trích xuất từ tài liệu:
Suse Linux 9.3 For Dummies- P9 100 Part II: Test Driving SUSE You can delete a directory only when the directory is empty. To remove an empty directory tree, you can use the -p option, like this: rmdir -p /usr/src/book/java/examples/applets This command removes the empty parent directories of applets. The com- mand stops when it encounters a directory that’s not empty. Commands for finding files The find command is very useful for locating files (and directories) that meet your search criteria. When I began using UNIX many years ago (Berkeley UNIX in the early 1980s), I was confounded by the find command. I stayed with one basic syntax of find for a long time before graduating to more complex forms. The basic syntax that I discovered first was for finding a file anywhere in the file system. Here’s how it goes: Suppose you want to find any file or directory with a name that starts with gnome. Type the following find command to find these files: find / -name “gnome*” -print If you’re not logged in as root, you may get a bunch of error messages. If these error messages annoy you, just modify the command as follows and the error messages are history (or, as UNIX aficionados say, “Send ’em to the bit bucket”): find / -name “gnome*” -print 2> /dev/null This command tells find to start looking at the root directory (/) for file- names that match gnome*, and to display the full pathname of any matching file. The last part (2> /dev/null) simply sends the error messages to a spe- cial file that’s the equivalent of simply ignoring them. You can use variations of this simple form of find to locate a file in any direc- tory (as well as any subdirectories contained in the directory). If you forget where in your home directory you’ve stored all files named report* (names that start with report), you can search for the files by using the following command: find ~ -name “report*” -printPlease purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Chapter 6: Finding and Organizing Files 101 When you become comfortable with this syntax of find, you can use other options of find. For example, to find only specific types of files (such as directories), use the type option. The following command displays all top- level directory names in your Linux system: find / -type d -maxdepth 1 -print You probably don’t have to use the complex forms of find in a typical Linux system — but if you ever need to, you can look up the rest of the find options by using the following command: man find An easy way to find all files that match a name is to use the locate command that searches a periodically updated database of files on your system. For example, here’s a typical output I get when I type locate Xresources on a Debian system: /etc/X11/Xresources /etc/X11/Xresources/xbase-clients /etc/X11/Xresources/xfree86-common The locate command isn’t installed by default in SUSE Linux, but it’s very easy to install. See Chapter 23 for information on how to use it. Commands for mounting and unmounting Suppose you want to access the files on this book’s companion DVD-ROM when you are logged in at a text console (with no GUI to help you). To do so, you have to first mount the DVD-ROM drive’s file system on a specific direc- tory in the Linux file system. Type more /etc/fstab in a terminal window to look at the /etc/fstab file for clues to the names of devices such as a floppy drive and DVD/CD drive. SUSE Linux distributions uses the device name /dev/cdrom to refer to DVD/CD-ROM drives, whereas for a DVD/CD-R drive (a CD or DVD burner), the device name ...

Tài liệu được xem nhiều: