TAILIEUCHUNG - File Management

Filenames may contain any character except /, which is reserved as the separator between files and directories in a pathname. Filenames are usually made of upper- and lowercase letters, numbers, “.” (dots), and “_” (underscor es). Other characters (including spaces) are legal in a filename, but they can be hard to use because the shell gives them special meanings. So we recommend using only letters, numbers, dots, and underscore characters. You can also use “–” (dashes), as long as they aren’t the first character of a filename, which can make a program think the filename is an option | 4 File Management In this chapter File and Directory Names File and Directory Wildcards Creating and Editing Files Managing Your Files Printing Files Chapter 3 introduced the Unix filesystem. This chapter explains how to name edit copy move find and print files. File and Directory Names As Chapter 3 explains both files and directories are identified by their names. A directory is really just a special kind of file so the rules for naming directories are the same as the rules for naming files. Filenames may contain any character except which is reserved as the separator between files and directories in a pathname. Filenames are usually made of upper- and lowercase letters numbers . dots and _ underscores . Other characters including spaces are legal in a filename but they can be hard to use because the shell gives them special meanings. So we recommend using only letters numbers dots and underscore characters. You can also use - dashes as long as they aren t the first character of a filename which can make a program think the filename is an option. If you have a file with a space in its name the shell will be confused if you type its name on the command line. That s because the shell breaks command lines into separate arguments at the spaces. To tell the shell not to break an argument at spaces put quote marks around the argument. For example the rm program covered later in this chapter removes files. 66 7 January 2002 13 13 File and Directory Wildcards 67 To remove a file named a confusing name the first rm command which follows doesn t work the second one does ls -l total 2 -rw-r r 1 jpeek users 0 Oct 23 11 23 a confusing name -rw-r r 1 jpeek users 1674 Oct 23 11 23 ch01 rm a confusing name rm a no such file or directory rm confusing no such file or directory rm name no such file or directory rm a confusing name Unlike some operating systems Unix doesn t require a dot . in a filename in fact you can use as many as you want. For instance the filenames pizza and .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.