Linux prompt No such file or directory solution

  
                  

Problem Description

Solution Reasons for analysis, maybe because my platform migration encounters permission problems, we will perform permission conversion

1) Convert under Windows:

Some editors such as UltraEdit or EditPlus first convert the script code and then execute it in Linux. The conversion method is as follows (UltraEdit): File-->Conversions-->DOS->UNIX.

2) Method

Open the sh file with vim, type: [plain] :set ff Enter, display fileformat=dos, reset the file format: [plain] :set ff =unix Save and exit: [plain] :wq Execute again, it can be

3) Permission conversion in Linux

Can also be converted in Linux:

First To ensure that the file has executable permissions

#chmod u+x filename

Then modify the file format

#vi filename

Three methods are convenient Quickly solve the Linux implementation of the .sh file, prompting No such file or directory.

Copyright © Windows knowledge All Rights Reserved