Coreutils is a package of GNU software containing many basic tools, such as ls
, cp
, and mv
, which are essential for Unix-like operating systems. These utilities are fundamental for file manipulation, text processing, and system management.
The core utilities include:
ls
: List directory contentscp
: Copy files and directoriesmv
: Move/rename files and directoriesrm
: Remove files or directoriestouch
: Change file timestampschmod
: Change file modes or Access Control Listschown
: Change file owner and groupFor more detailed information on each utility, refer to the respective internal pages:
Each utility has its own set of options and usage patterns. For example, the ls
command can be used with various options to display different levels of detail about files and directories.
The GNU Core Utilities, or coreutils, are the basic file, shell, and text manipulation utilities of the GNU operating system. These utilities are the fundamental tools that are expected to exist on every Unix-like operating system. They provide the basic functionalities needed for file manipulation, such as listing files, copying and moving files, changing file permissions, and more. Understanding and mastering these tools is essential for any Linux server administrator, as they form the backbone of many administrative tasks. For instance, ls
is used to list directory contents, which is crucial for navigating the filesystem. cp
and mv
are used for copying and moving files, respectively, which are common tasks in file management. rm
is used to remove files or directories, while touch
is used to change file timestamps. chmod
and chown
are used to change file permissions and ownership, respectively, which are important for maintaining security and proper access control on a server.
Utility | Description | Common Options | Example Usage |
---|---|---|---|
ls |
List directory contents | -l , -a , -h |
ls -lah |
cp |
Copy files and directories | -r , -v , -i |
cp -r source/ destination/ |
mv |
Move/rename files and directories | -i , -v , -n |
mv oldname newname |
rm |
Remove files or directories | -r , -f , -i |
rm -rf directory/ |
touch |
Change file timestamps | -a , -m , -t |
touch -t 202401010101.01 file |
chmod |
Change file modes or Access Control Lists | -R , -v , -c |
chmod 755 file |
chown |
Change file owner and group | -R , --from , --dereference |
chown user:group file |