How to rename directory and file in linux/unix
To rename directories and files, we can use the linux mv command. You can also use the awk command to rename rule directories or files...
list directory with ls command in linux/unix
In linux, with the ls command -d option, you can only list the directories of the current directory, not recursively....
What command is linux ll?
Linux ll is not a command provided by the linux system. It is usually the command alias we set. Generally, the ls -l command is...
Sort files or folders by size with ls command in linux/unix
The Linux ls -S option can be sorted by size from largest to smallest, or the ls -rS option can be sorted by size from...
How to display the file size in megabytes with ls in linux/unix
Display the file size in megabytes, which can facilitate us to browse the file storage size. Syntax: ls -lh , to display the file size...
How to list hidden files and folders in linux/unix
In linux/unix, when it comes to listing files and folders, everyone will think of the ls command. Yes, there are many options for the ls...
List directories recursively in linux/unix
Recursive listing of directories can help us begin to understand the current directory structure. In linux/unix, we can use any of the following commands to...
mkdir recursively create directories in linux/unix
Creating directories recursively can help us greatly improve efficiency during development. In linux/unix, we can use the mkdir command to recursively create directories and subdirectories...
rm delete recursively in linux/unix
How to use the rm command to delete files and directories recursively in linux/unix. Syntax Examples In the following example, recursively delete data folder: First...
How to recover deleted files in Linux
Linux recover deleted files, we can use the debugfs command. It can be used to examine and change the state of an ext2, ext3,...
mkdir no such file or directory in linux/unix
mkdir no such file or directory - This error is reported because you created a multi-level directory and the intermediate directory does not exist. We...
mkdir if not exists in linux/unix
mkdir creates a directory if it does not exist, we can use the mkdir -p option. syntax: mkdir -p foo/bar/baz, will create directories foo, foo/bar,...
How to find file by name in linux/unix
To find files by name, we can use the linux find command. For example: find directory -type f -name "filename"...
The difference between ls, ls -a, ls -A, ls -l, ls -al, ls -lrt
ls -a : display all files and subdirectories in the current directory, including hidden "." And ".." etc; ls -l : display...
Sort files or folders by date/time with ls command in linux/unix
In linux/unix ls -t option can be sorted by date from newest to oldest, or ls -rt option can be sorted by date from oldest...