9 FAQ tagged "ls_command"
Viewing 1-9 of 9 FAQ -- Bash Shell Check Whether a Directory is Empty or Not
Q. How do I check whether a directory is empty or not under Linux / UNIX using a shell script? I’d like to take some action if directory is empty.
A. There are many ways to find out if a directory is empty or not under UNIX / Linux bash shell. You can use find command [...] - How to: Linux / UNIX create soft link with ln command
Q. How do I create a soft link (symbolic link) under UNIX or Linux operating system?
A. To make links between files you need to use ln command. A symbolic link (also known as a soft link or symlink) consists of a special type of file that serves as a reference to another file or directory. [...] - Linux / UNIX: Display file inode (index number)
Q. How do I display file inode number using command line?
A. An inode is a data structure on a Unix / Linux file system. An inode stores basic information about a regular file, directory, or other file system object. You can use following two commands to display an inode:
[a] ls command : list directory [...] - Linux Rules for file names
Q. Can you specify rules for naming a file name under Linux?
A. When you save a data, you nee to select a file name, you need to follow certain rules and regulation regarding the length of the name and the types of characters you include.
Rules for naming file names
The rules for naming a file names [...] - Examining the Linux / FreeBSD / UNIX filesystem with ls command
Q. I’m new to Linux and how do I examine filesystem and identify regular files or directories?
A. Both Linux and UNIX comes with ls command for examining the filesystem. You can use ls command to look at the filesystem. ls command can display:
=> Character devices
=> Regular files
=> Sym links (symbolic links)
=> Directories
=> Pipes
=> Sockets
=> Block [...] - Linux / UNIX: Device files
Q. Can you explain me what is device files and how do I access or see device files? Why UNIX / Linux has device files?
A. Under Linux and UNIX each and every hardware device treated as a file. A device file allows to accesses hardware devices so that end users do not need to [...] - Linux / UNIX find the smallest directories or files in current directory
Q. How do I list or find the smallest directories or files in the current directory under Linux or UNIX like operating system?
A. There is no direct command exists for this task. However by using shell pipes and combination of other commands one can produced the desired result.
Task: Display list of smallest files
You need to [...] - Linux / UNIX - Display the permissions of a file
Q. How do I list or display the permission of a file using ssh? I don’t have GUI installed on a remote Linux computer.
A.You need to use ls command with -l option. File access permissions are displayed in the first column of the output, after the character for file type.
ls command List [...] - How to: Linux or UNIX List just directories or directory names
Q. How do I list just directory names under Linux?
A. Under Linux or UNIX use ls command to list files and directories. However ls does not have an option to list only directories. You can use combination of ls and grep to list directory names only.
Display or list all directories
Type the following command:
$ ls [...]
Viewing 1-9 of 9 FAQ - ( see all popular tags )


Recent Comments
Yesterday ~ 19 Comments
Yesterday ~ 1 Comment
Yesterday ~ 7 Comments
Yesterday ~ 2 Comments
Yesterday ~ 2 Comments