& gt write your own create_filelist.sh file, as follows.
1, find command:
Find is followed by the address where the file to be searched is stored, followed by the -name parameter, and the latter parameter represents the file name *. Jpg means all jpg files.
The> symbol' means output to a file, here it is output to the specified txt file.
2.sed command:
-i stands for directly modifying the contents of the read file, rather than outputting it to the terminal.
The contents in quotation marks represent substitution, $ represents substitution at the end of the file, followed by spaces and numbers representing each line of characters, followed by spaces and numbers representing the corresponding tag number of the file.
How to view the file path under linux?
Answer: The method for linux to obtain the file path is as follows;
Step 1: Open the linux system and right-click on the blank space of the linux desktop.
Step 2, in the pop-up drop-down option, click Open Terminal.
Step 3, enter the cd command at the terminal to enter a directory, and then enter pwd.
Step 4, then press Enter to view the specific path information of the file.
How to get the absolute path of file in linuxshell script? Is readlink okay?
The path passed to the function is /root/file. If this is the first parameter of the function, it can be obtained with $ 1 in the function. After obtaining the file names of file 1 and file 2, echo "$ 1/file 1" outputs/root/file/file1,and echo "$1/file 2" outputs/root/file/file 2.
How does read read data from files in linux?
It can be achieved by using the following code:
Note: The following example omits error handling.
# includestdio.h & gt
# includestring.h & gt
# includes ys/types . h & gt;
# includes ys/stat . h & gt;
# includefcntl.h & gt
typedefstruct
{
charname
Import;
} people;
intmain(intargc,char**argv)
{
//open
intfd=open("name.file ",O_RDWR|O_CREAT,0666);
//write
Personzhang3
memset((void*)zhang3,0x00,sizeof(Person));
Strcpy (Zhang 3.name, "Zhang 3");
Zhang 3 . age = 42;
write(fd,(void*)zhang3,sizeof(Person));
//lseek
lseek(fd,0,SEEK _ SET);
//read
Personli4
memset((void*)li4,0x00,sizeof(Person));
read(fd,(void*)li4,sizeof(Person));
printf("%sn ",li4 . name);
printf("%dn ",li4 . age);
//Close
Close (FD);
return0
}
How to read the storage permission of a file under unix/linux system?
Unix/linux reads the storage rights of files through command ls-a, and modifies the storage rights of files through command chown.