Submitted by Des on Thu, 05/31/2018 - 14:31
Sticky Bit
The sticky bit is set on a directory as a way to prevent users from removing files that they do not own. It is represented by the t over the x position on the other octal as in -rwxrwxrwt or -rwxrwxrwT when the x bit is not set on other.
You can set it by using chmod 1775 or chmod +t
Setgid bit on directory
Submitted by Des on Mon, 07/25/2016 - 11:30
You can use the find command from terminal. CD info the directory you wnat to run the command in.
List the folder first to see that we have the correct ones
sudo find . -maxdepth 1 -type d -ls
If we have a list of the directories we want then we can run
sudo find . -maxdepth 1 -type d -exec chmod 755 {} \;
Submitted by Des on Mon, 03/07/2016 - 12:29
First we have to use find command to look for either directories of files and then we use the exec command on our find.
To change the permissions on all directories in a certain path
$ sudo find /path/you/want/to/search -type d -exec chmod 775 {} +
To change the permissions on all files in a certain path
$ sudo find /path/you/want/to/search -type f -exec chmod 775 {} +
To Know what the chmod 775 does go here
Submitted by Des on Sun, 08/16/2015 - 18:14
If your interested in converting all higher case "JPG" extensions to lower case "jpg" You could use the command line utility rename like so. CD into directory you want to change. Then
rename -n 's/\.JPG$/\.jpg/' *
Use -n option to test what will be changed, then when you happy with results use without like so
rename 's/\.JPG$/\.jpg/' *
Submitted by Des on Thu, 08/13/2015 - 21:30
To list all the directories in a folder by size without giving all subfolders, a nice clear list with no clutter use
$ du --max-depth 1 -h
du = estimate file space usage
--max-depth 1 = only go 1 deep in the tree
-h = human-readable
For example
Submitted by Des on Tue, 03/03/2015 - 14:50
In order to add text to a video file first we need to make sure we have all the editing tools and codecs
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install ffmpeg x264
sudo apt-get install frei0r-plugins mjpegtools
Once all these are installed we can add text by running the command below
Submitted by Des on Wed, 10/01/2014 - 16:40
If using ifconfig eth0 down and up on ubuntu it wont renew the IP from the DHCP server. For this we need to restart the network manager.
To restart the networking service in ubuntu in order to get new IP from DHCP
sudo service network-manager stop
sudo service network-manager start
Submitted by Des on Thu, 03/27/2014 - 19:13
Linux permissions are set for three groups on each file or folder. The three groups are Owner, Group and World. If I open a terminal and type;
ls -la
Submitted by Des on Wed, 10/02/2013 - 10:20
Initialize the disk or partition for use by the Logical Volume Manager LVM
pvcreate /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4
pvs
pvdisplay
Create a volume group
vgcreate myvg /dev/sdb1 /dev/sdb2
vgdisplay
Create a logical volume in an existing volume group
lvcreate --size 1g myvg (creates /dev/myvg/lv01
lvs
lvdisplay
Build the file system ext4 on our new logical volume /dev/myvg/lv01
mkfs -t ext4 /dev/myvg/lv01
Submitted by Des on Tue, 10/01/2013 - 14:32
To list all of the packages installed on you system
rpm -qa
Different flavors of linux have different package managers that do a lot of the backgroung work like installing dependencies.
SuSe uses zypper
To install a package named nmap
zypper in nmap
To search for a package using zypper
zypper se nmap
Where is the package installed
which nmap
/usr/bin/nmap
Pages