find . -type d -name ".git" | xargs rm -rf…
Files and Directories Introduction     In the previous chapter we coveredthe basic functions that perform I/O. The discussion centered on I/O for regular files-opening a file, and reading or writing a file. We'll now look at additionalfeatures of the…
cp - Copy Files and directories mv - move/rename files and directories mkdir - create directories rm - remove files and directories ln - create hard and symbolic links…
August 27, 2013Software Developmentresources, subversion, svn, tutorial, version control Who knew it would be so hard to get svn to ignore some files and directories? I’m working on an Android project, and I wanted svn to stop looking at me questioni…
4.1 Introduction 4.2 stat, fstat, fstatat, and lstat Functions The lstat function is similar to stat, but when the named file is a symbolic link, lstat returns information about the symbolic link, not the file referenced by the symbolic link. 4.3 文件类…
The Linux “du” (Disk Usage) is a standard Unix/Linux command, used to check the information of disk usage of files and directories on a machine. The du command has many parameter options that can be used to get the results in many formats. The du com…
Step 1 Copy the files and directories to other place. Step 2 Delete the files and directories. Step 3 Commit. Step 4 Paste the files and directories from backup place. Step 5 Commit.…
Most projects have automatically generated files or folders from the operating system, applications, package managers etc. Usually, we don't want to include these types of things in our remote repos because they can clutter the git history/storage an…
本篇主要介绍文件和文件系统中常用的一些函数,文件系统的组织结构和硬链接.符号链接. 通过对这些知识的了解,可以对Linux文件系统有更为全面的了解.   1 umask函数 之前我们已经了解了每个文件与权限相关的9个位(bit),我们现在来了解一下当每个进程创建文件时默认会设置该文件的文件权限(the file mode creation mask). umask函数设置该进程默认创建文件的权限掩码(the file mode creation mask),并且返回之前的权限掩码值. #incl…
 1 File Times 每个文件会维护三个时间字段,每个字段代表的时间都不同.如下表所示: 字段说明: st_mtim(the modification time)记录了文件内容最后一次被修改的时间. st_ctim(the changed-status time)记录了文件的i-node最后一次被修改的时间,如修改文件权限位,修改文件所有者ID,修改关联到该文件的link数目. i-node中的信息和文件的实际内容是分离的,所以当更新i-node时,需要更新的时st_ctim(the ch…