Practical Shell command memo Opening Remarks: Here are some common bash commands, such as a memo and a hope to help others solve some problems. 1. check whether the file contains [php] if [-f. /foo.txt] then echo the file exists fi 2. check whether the directory contains [php] if [-d. /test1] then echo the directory exists fi 3. keep the highlighted feature [php] androidyue @ ubuntu :~ /Desktop $ ls | grep s -- color = always | more 4. use curl to batch download ftp resources [php] curl-u user: password 'ftp: // 10.0.1.5/archive/photo/IMG _ [8763-9147]. JPG '-O 5. run the program in the background and add & after the program. Note that there is a space between the two [php] androidyue @ ubuntu :~ /Desktop $ start_eclipse.sh & [1] 3749 6. Obtain file information [php] androidyue @ ubuntu :~ /Pictures/coding $ file flyweight.png: PNG image data, 723x311, 8-bit/color RGB, non-interlaced